Git Product home page Git Product logo

Comments (11)

asmeurer avatar asmeurer commented on August 15, 2024

I don't see the need to write things to a file. Just do it in real time. There could be a flag, --recursive, which, when it finds a build dependency that doesn't exist (which is not the same as unsatisfiable build dependencies, which is much more complicated), tries to find a recipe for that package in ../$RECIPE_DIR and proceeds. A few issues:

  • You don't have to organize your recipes in one flat directory structure (and for your R packages it's probably a bad idea because there are so many of them).
  • You don't have to name the recipe directory the same as the package. To be correct, it should read each meta.yaml file. There could also be multiple recipes for the same package.

Even so, those are both things that could be fixed later, as people request them. A simple "for each non-existing build dependency X find a directory named X in ../$RECIPE_DIR and recursively build it" should work for now.

from conda-build.

asmeurer avatar asmeurer commented on August 15, 2024

I guess an issue would be that you need to make sure the lock is not held when this happens. Perhaps that's why you were writing to a file?

from conda-build.

tpn avatar tpn commented on August 15, 2024

I think the main reason I chose to write to a file was because there wasn't an easy way to inject the necessary code within conda when I looked into it. conda build quickly entered into the SAT solver stuff which appeared less amenable to the change I wanted to make. (And I also wanted to make the smallest/quickest change possible at the time in order to move onto other issues.)

I have absolutely no preference for how it's implemented -- whatever gets the job done :-)

from conda-build.

asmeurer avatar asmeurer commented on August 15, 2024

If you got to the SAT solver you dug too far. conda-build is now a separate project, so you should be safer from digging too far in the future. This should happen either at the CLI level or one level below that (it will have to be below it because that's the point where it actually reads the meta.yaml).

from conda-build.

tpn avatar tpn commented on August 15, 2024

So this is the relevant point I believe:

https://github.com/conda/conda-build/blob/master/conda_build/build.py#L157

That'll bubble missing packages back up to the CLI as an exception. It's not currently well suited for augmentation in the manner we're discussing:

  1. create_env() will need to distinguish callers; recursive building should only be attempted on the build path, not the test() path, which also calls this function.
  2. The solver just raises generic RuntimeErrors for everything, with the specifics conveyed in the exception's .message/args attribute. Ideally, it should raise a custom exception for the situation we're interested in, such that we can explicitly catch it downstream, in conda_build/build.py.

from conda-build.

asmeurer avatar asmeurer commented on August 15, 2024

A custom exception sounds like a good idea. RuntimeError is used for anything that should print an error to the command line without a traceback.

On the other hand, I'm not clear that it needs to go all the way back to the CLI. There shouldn't be any logic in the CLI code that needs to be run again (I state this without actually having read the code).

from conda-build.

dan-blanchard avatar dan-blanchard commented on August 15, 2024

#53 adds support for this as a side effect. It would have been impossible to build ~2500 CPAN packages otherwise.

from conda-build.

tpn avatar tpn commented on August 15, 2024

Dan that's awesome. I was on holiday last week so I'm really back logged with recent changes but I look forward to reviewing this. Sounds like your Perl pain has been very similar to the R issues I faced.

Sent from my iPhone

On Mar 10, 2014, at 14:02, "Dan Blanchard" <[email protected]mailto:[email protected]> wrote:

#53#53 adds support for this as a side effect. It would have been impossible to build ~2500 CPAN packages otherwise.


Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-37213728.

from conda-build.

AnneTheAgile avatar AnneTheAgile commented on August 15, 2024

@dan-blanchard , great news! @tpn , what do you think, can we close this now?
//AnneTheAgile

from conda-build.

asmeurer avatar asmeurer commented on August 15, 2024

Yes. There is an issue (#79), but this can be closed.

from conda-build.

github-actions avatar github-actions commented on August 15, 2024

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

from conda-build.

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.