-
Notifications
You must be signed in to change notification settings - Fork 1k
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
When is requirements_to_unlock: :all
used?
#600
Comments
Hey @omnibs, This is something of an implementation detail, but here's the thinking on
Hopefully that helps clarify? |
It helps a bit. I'm thinking I might need I'm working on Elm support, and Elm has an The We might say, for instance:
If Dependabot updates So it's kinda like I'm thinking I could either: a) Detect when bumping a dependency affects other dependencies in
Which do you think makes more sense? Would b) work? I'm leaning towards it. If a) is better, how do I communicate to Dependabot it can call me with |
Investigating some more, I see b) won't work. If I don't receive I'll change to a simpler question: How do I make sure my I'm imagining there must be some logic more complex than what's in dependabot-script/update-script.rb:89-90 that falls back to |
Hey, sorry for the slow reply, was crunching on getting Go support out (now done 🎉). Elm support would be awesome! Thanks for looking at it! In the main Dependabot updater script, we have the following:
(The As a result, if you proceed with the approach suggested in (a) that should work perfectly. That's very surprising behaviour from The other important consideration when adding a new language is that, if at all possible, Dependabot shouldn't actually do installs. With npm for example there's a |
No way, this is super fast =D
I know rite?!?
It doesn't support multiple versions of the same dependency. I don't really know why
This is super helpful! 😻
It's a little complicated with Elm. There's nothing like Let me know if it's sensible to move forward with Elm support given the above. One hacky alternative would be forking elm-package, but I'd rather wait for Elm 0.19 which should be somewhere around the next 3 months than to do it on the current one. |
Forking elm-package sounds really grizzly - we definitely don't want to do that! Have you looked into any way to hack into its innards? Take a look at what we do for yarn and composer for example. It can get pretty ugly, mind... Edit: The ease of hacking around in the above way really depends on how easy / sane it is to monkey patch in a language, and I have no idea about Elm. If shelling out to an Elm script would allow us to import the bits of the package manager that we need, or to patch over the bits that actually do the install, then it's a great move. If the install is intricately entwined with resolution then it's less good. How slow are we talking for an install on a real life project? |
We have one of the largest Elm codebases in the world and our deps take 50s to download from my local machine in Brazil (130ms ping to http://package.elm-lang.org/). I'm imagining that's too much. The package manager is a Haskell binary and the code for dependency resolution is just in there, I can't see a way to monkey patch that :< I talked to some colleagues who came up with solutions: I'm opting to go with a) bc we can write tests for real known scenarios (like the elm-css vs datetimepicker above) and know when our expectations deviated from |
Yep, 50s is too long for Dependabot to spend at the resolution stage (because it has to do it many times over). Option (a) sounds good to me - sounds like that does exactly what we want, which is curtail @hmarr - any thoughts? |
Another thing about Elm is the release cycle is very long. Elm-package hasn't changed since Nov 2016. The next version (Elm 0.19) for instance will introduce a new dependency file format, so we don't expect this work to break for anyone ever. We expect to have to re-do this work for 0.19 and probably keep support for both 0.18 and 0.19 in parallel in Dependabot. |
Cool - supporting both versions once 0.19 comes out sounds sensible to me. Super excited about this! |
Just did a search for
requirements_to_unlock
in the codebase and only found:all
being passed inmaven
tests. It's also not mentioned in thedependabot-script
.I'm also confused with the whole flow between
:own
,:none
and:all
.:none
seems to be used only incan_update?
and only when the dependency doesn'tappears_in_a_lockfile?
. It doesn't propagate it outwards, so I don't understand how we can arrive atupdated_dependencies
withrequirements_to_unlock: :none
.On
:all
, I have no ideas. I imagine Dependabot itself decides to send it in forupdated_dependencies
but I can't infer the when/why.The text was updated successfully, but these errors were encountered: