Giter Site home page Giter Site logo

Comments (12)

Lx avatar Lx commented on July 30, 2024

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.

Lx avatar Lx commented on July 30, 2024

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.

SineSwiper avatar SineSwiper commented on July 30, 2024

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.

Lx avatar Lx commented on July 30, 2024

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.

SineSwiper avatar SineSwiper commented on July 30, 2024

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.

SineSwiper avatar SineSwiper commented on July 30, 2024

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.

Lx avatar Lx commented on July 30, 2024

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.

Lx avatar Lx commented on July 30, 2024

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.

Lx avatar Lx commented on July 30, 2024

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.

Lx avatar Lx commented on July 30, 2024

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.

SineSwiper avatar SineSwiper commented on July 30, 2024

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.

SineSwiper avatar SineSwiper commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.