-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add a dependency solver based on the Ruby Solve library #6
Conversation
7b05101
to
0aeb0a3
Compare
It seems Semverse requires a newer ruby, so merging this means having to drop support for <2.1.0. Is that okay? I did some refactoring and added an option to allow/disallow major updates from the resolution. |
Thanks! I also tested it briefly and it works fine for me as well. It is absolutely no problem for me to support ruby >=2.2. Add some documentation at the README please and I'll merge it |
@tampakrap I did a few final cleanups as well. It should now handle missing metadata in git modules a bit better. |
I tried to run it, I get NameError: uninitialized constant Ra10ke::Solve::Graph in lib/ra10ke.rb:96 Also can you make pry an optional development only dependency? |
hmm? the code shouldn't have any references to pry anymore. Maybe I accidentally committed some debug code... |
Eugh, I think I've gotten it somehow mixed up when rebasing. Let me try to untangle it... |
The solver uses YAML::Store to cache release metadata, so subsequent runs will be somewhat faster By default, the resolver disallows major updates, but this can be turned off.
@tampakrap The PR should no longer contain anything extra. All of the new code is now in lib/solve.rb |
thanks a lot! |
I implemented a dependency solver for Puppetfiles that's rather much faster than Librarian at least as far as I can tell. The limiting factor is how slowly the Forge API returns release metadata.
I've tested, and it works for me at least. I'm now looking for feedback on what the task should actually do (I kind of want it to output an updated Puppetfile, but it's useful enough as is). It supports both git and Forge modules
The solver uses YAML::Store to cache release metadata, so subsequent
runs will be somewhat faster, but it still only fetches the three most recent releases for each dependency.