Comments (12)
Looks like --skip-satisfied
isn't the solution, since it still goes ahead and installs the specified version anyway.
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.
from dist-zilla-travisci.
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).
from dist-zilla-travisci.
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.
from dist-zilla-travisci.
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 cpanm
allows me to do this:
$ cpanm MooseX::Types~0.01
You have MooseX::Types (0.35)
i.e. a later version of that module required by a different dependency isn't overwritten with an older version.
Provided that Travis' cpanm
offers the same thing, I wonder if this is an acceptable short-term fix? It'd at least get me going again on my own MVDT adventures...
from dist-zilla-travisci.
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.
from dist-zilla-travisci.
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 --installdeps
to only install dependencies that might have been overridden by other installs. There's also some fixes for distro de-duplication, especially between phases.
Try it out and see if that works better.
from dist-zilla-travisci.
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?
from dist-zilla-travisci.
Actually, don't worry about that--I've managed to get the repo code working:
$ cpanm --uninstall Dist::Zilla::App::Command::chainsmoke
$ PERL5LIB=$HOME/code/Dist-Zilla-TravisCI/lib dzil chainsmoke --mvdt
I was falling over dzil
's --lib-inc
option, which seems to only be honoured after the Dist::Zilla::App::Command
namespace is loaded. Not helpful when you're trying to use --lib-inc
to affect the available dzil
commands. Unsure whether that should be regarded as a dzil
bug or not.
Anyway, the changes so far seem to be working well for me. I'll report back if I run into any problems.
from dist-zilla-travisci.
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 MooseX::Types
v0.01 (among other things), so the following .travis.yml
lines will be generated:
...
install:
...
- cpanm --verbose PHAYLON/MooseX-Types-0.01.tar.gz
- cpanm --verbose ...
- cpanm --verbose ...
- cpanm --verbose ...
- cpanm --verbose --installdeps PHAYLON/MooseX-Types-0.01.tar.gz
- cpanm --verbose ...
- cpanm --verbose ...
- cpanm --verbose ...
...
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 MooseX::Types
v0.02, the newer version of that module will be installed. This is the correct, desired behaviour.
But in the second pass, it seems that the dependencies for MooseX::Types
v0.01 (the old version) would still be checked and installed rather than those for the newer version.
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?
from dist-zilla-travisci.
I suppose a really hacky workaround might be to replace the second pass with lines like these:
- cpanm --verbose --installdeps MooseX::Types~`pmvers MooseX::Types`
...
which, if I understand the cpanm
docs correctly, would cause the dependencies of the currently installed version of MooseX::Types
to be checked and installed again as necessary (assuming that backticks can even be used this way, and assuming the availability of the pmvers
tool off CPAN).
from dist-zilla-travisci.
Seems like an edge case. You might have different deps installed that you don't actually need, but --installdeps
shouldn't actually downgrade anything.
from dist-zilla-travisci.
This has now been released in v1.05. If there are still some outstanding issues, those can be covered in another ticket.
from dist-zilla-travisci.
Related Issues (20)
- Travis failing to build a dist::zilla distribution with Perl 5.8 HOT 5
- wrong phase being used HOT 3
- build branch isn't adding the travis.yml HOT 8
- Docs question in dist.ini recommendation HOT 1
- --skip-satisfied does not satisfy deps HOT 3
- Can't get past square one HOT 2
- Weird travis error: dump_config was not found in the inheritance hierarchy for ...::ChainSmoking HOT 9
- List::AllUtils::pairs needs 0.04 or later HOT 2
- Uses File::Slurp, known to be buggy and vulnerable
- build=1 commands not taking place HOT 1
- should not test unsupported Perl versions by default HOT 2
- Support for sudo: false HOT 2
- [Travis::TestRelease] blows up HOT 4
- can't install plugin HOT 1
- Please, please, please, remove `use sanity` from App::Command::chainsmoke HOT 1
- is 1.15 missing @common before_install section ? HOT 1
- exclude gh-pages by default?
- When used with [Git::CommitBuild] only jobs using Perl versions provided by default work HOT 3
- 'blead' perl version not working on Travis.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dist-zilla-travisci.