Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate file logic from http and filesystem logic in download #830

Merged
merged 1 commit into from
Mar 8, 2019

Conversation

kytrinyx
Copy link
Member

@kytrinyx kytrinyx commented Mar 3, 2019

This creates a new type upon which we can hang logic specific to the solution file in the big for loop in download.

@jdsutherland this is an example of what I mean by a smaller step. What I like about this abstraction is that it doesn't know anything about the filesystem or the API, it just hides some of the noisy cruft that made the for loop bigger and more unwieldy. I don't think this is the end of the refactoring, there's more to do, but I think it's a cohesive change that doesn't make guesses or hide necessary information.

@nywilken if you have time to look at this one, I'd love your input!

@nywilken
Copy link
Contributor

nywilken commented Mar 5, 2019

@kytrinyx @jdsutherland seeing as this change is related to the PR #826 I will comment there as well.

What I like about this abstraction is that it doesn't know anything about the filesystem or the API, it just hides some of the noisy cruft that made the for loop bigger and more unwieldy

I agree with this statement. The for loop has a lot going on already so breaking out the details around the construction of Solution File paths and URLs helps to make the for loop grokkable. I particularly like how you can test Solution File logic directly now.

@kytrinyx kytrinyx force-pushed the solution-file-abstraction branch from 4e1aaae to 8cd67be Compare March 5, 2019 05:12
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m good with this improvement.

@kytrinyx kytrinyx merged commit d6ea6a5 into master Mar 8, 2019
@kytrinyx kytrinyx deleted the solution-file-abstraction branch March 8, 2019 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants