-
Notifications
You must be signed in to change notification settings - Fork 14
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
Fix dips, nimble file handling, and gitops #120
base: master
Are you sure you want to change the base?
Conversation
7bba972
to
65630b3
Compare
This PR started to work on nim-lang#117 but uncovered a few other items which needed cleaned up or fixed. Changes: Combine multiple ways to search for Nimble files into one place fixes some edge cases in handling finding Nimble files fixes issue with writing default config file and handling the deps cli option osutils.nim provides shims for unit testing proc's using a subset of file operations unit tests for various nimble file states unit tests for parsing PkgUrl's fixes some adhoc git execs to use the gitops module, restoring logging etc
b76d86e
to
4882b25
Compare
@Araq fixed this PR. I started tracking down another set of issues and got a broken commit mixed in here. |
type
NimbleFile = object
results: int
file: string # only valid if results == 1
|
Don't error on ambiguous nimble files
Co-authored-by: Andreas Rumpf <[email protected]>
It does introducing another possible error state, but that can be handled by ensuring the code that finds the nimble files doesn't return Mainly I found it useful in documenting elsewhere in the codebase that the Nimble file might not be found yet and that using |
This seems like a good PR. Any status on it ? |
@@ -295,6 +306,7 @@ proc expand*(c: var AtlasContext; g: var DepGraph; nc: NimbleContext; m: Travers | |||
g.nodes[i].status = status | |||
|
|||
if g.nodes[i].status == Ok: | |||
g.nodes[i].nimbleFile = c.findNimbleFile(g.nodes[i].pkg, dest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a while but IIRC there were cases where the nimble file wasn't being found for newly added dependencies as it's traversing the graph.
Also, it needs to properly set the full path for the nimble file. There's issues when the deps or projects folder are different from the standard locations.
echo "\n" | ||
echo "SAT MaxIterationLimitError: " | ||
debugFormular c, g, f, s | ||
echo "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other parts of the codebase don't use echo
to report errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, just left over debugging statements. I'll go through and clean it up.
This PR started to work on #117 but uncovered a few other items which needed cleaned up or fixed.
Changes: