-
Notifications
You must be signed in to change notification settings - Fork 13
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
generated .travis.yml downgrades dependencies installed by other dependencies #9
Comments
Looks like I guess in my case, I could overcome the problem by looking for the very first error mentioning an unmet minimum version dependency in another dependency and hard-code that minimum version in my own code. This doesn't seem ideal though. |
No, this really isn't ideal. For each of my dependencies, I'd need to determine whether any of my other dependencies depend on that initial dependency and if so, determine the highest minimum version of each one from that. Then I'd need to repeat this every time I bump another dependency (which would even happen multiple times while determining that initial list). |
Interesting problem. It seems like ::TravisCI would need to deep dive into the dependency tree, see which other dependencies exist, and start at that minimum version first. Unfortunately, at this point in time, MVDT is a very manual process. So, even if that issue was solved, it's still requires incremental upgrades of each version (read: guesses) and re-tests until you get a full MVDT dep map that works. I have plans to revamp the model, using the Travis API and a local SQLite DB (or just a CSV) to keep track of test failures, and make this whole process automated. But, that's likely going to be months away, since I have a few other things on my plate. |
I'm not too offended by having to do the version incrementing myself; it gives me the opportunity to look at exactly why failures occur with the given version set and this can potentially highlight other problems that need fixing in my own code. Still, it'd be a nice convenience later down the track. Right now though, my locally-installed version of
i.e. a later version of that module required by a different dependency isn't overwritten with an older version. Provided that Travis' |
The problem with that is initially you actually want the downgrade. The stock TravisCI VM might have a version of that module above the one you want installed. Though, I might be splitting hairs at this point. This might be a fair compromise. But, I'd like to tackle the full problem at some point. I'll see about pushing something to the repo in the next few days. |
The latest repo has a compromise that may work better. It runs through two passes on the module installs. The first pass is the standard module install. The second pass is one with Try it out and see if that works better. |
Thanks for your efforts on this. I'd like to try out your changes but I'm not sure how to make them available on my system. Are you willing to push a new release of this module to CPAN? |
Actually, don't worry about that--I've managed to get the repo code working:
I was falling over Anyway, the changes so far seem to be working well for me. I'll report back if I run into any problems. |
I can see one potential problem with your approach (although I don't have an opinion at this stage on its likelihood, or any potential workarounds). My code says I need
So there are two "passes," where the first installs the base versions of each needed module (downgrading if necessary), and the second ensures that all minimum dependencies for each of those modules are still met afterwards. If one of the other modules later in the first pass require But in the second pass, it seems that the dependencies for I'm guessing that this would be a problem if v0.02 introduced dependencies not needed by v0.01, but which happened to be downgraded by something else in the first pass. The downgrades would not be corrected in the second pass because the correct required version is not being looked at. Does that make sense? Is this scenario even possible? |
I suppose a really hacky workaround might be to replace the second pass with lines like these:
which, if I understand the |
Seems like an edge case. You might have different deps installed that you don't actually need, but |
This has now been released in v1.05. If there are still some outstanding issues, those can be covered in another ticket. |
(Travis CI build log for reference.)
In my case,
dzil chainsmoke --mvdt
is adding aninstall
instruction for:All well and good so far, since my code depends on that module but doesn't specify a minimum version for it. All is working as advertised.
However, other modules before this one depend on later versions of this module, and do list a minimum version:
Still all well and good, since the necessary minimum version of that module is installed. Until this line, that is:
when
cpanm
actually downgrades whatever the installed version is back to 0.01.As a result, many unrelated explosions occur and the build errors out.
I'm guessing that the line calling
cpanm
has to be modified such that it also has a--skip-satisfied
option passed in, which would prevent downgrading. (Mind you, I'm not sure if this option would actually work when explicit filenames are passed the way they're being passed here.)The text was updated successfully, but these errors were encountered: