-
Notifications
You must be signed in to change notification settings - Fork 50
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
Recipe using experimental cache:
re-executes main build script
#1051
Comments
I just checked out the PR. Awesome, and thanks for trying!! |
That's just my lack of familarity with the new format (plus |
No change with cache:
requirements:
build:
- cmake
- ninja
- ${{ compiler('c') }}
- ${{ stdlib('c') }}
+ build:
+ script:
+ - if: linux
+ then: build.sh
+ else: build.bat i.e. something still re-executes |
Yes, it does :) |
Just call the file |
Every output (incl. the cache) is independent and follows the same rules about e.g. build scripts and so far we've copied the implicit behavior of conda-build. |
One difference seems to be that the run-exports of subpackages do get applied within a given recipe? Conda-build doesn't do that... FWIW, I think it'd be better to apply them, but just checking. |
OK, did that now, now running into issues with the file glob (I think). Logs of testing
AFAICT (more below), this actually fails for
So that means that the following file glob doesn't work: build:
files:
- if: linux
then: lib/libz.so
- if: osx
then: lib/libz.dylib
- if: unix
then:
- include
- lib/pkgconfig
- lib/libz.a
else:
- Library/include
- Library/share
- Library/lib/zlib.lib
- Library/lib/zdll.lib
- Library/lib/z.lib
- Library/lib/zlibstatic.lib
- Library/lib/pkgconfig What would be the correct way to specify this? |
Hmm, not sure how you mean it exactly. We apply run exports from the cache & from each output. In the console log you can see the source of the run export. We thought about appending the run export from the cache only to the "first" output in a chain of outputs (e.g. You can also ignore run exports in the cache, or in (each) output. |
Can you try |
I mean that for conda-build, the run-exports of host:
- {{ pin_subpackage('libzlib', exact=True) }} Similarly, the global build step does not apply run-exports to the outputs, at least not in general. That's why many recipes (including zlib's build:
- {{ compiler('c') }}
- {{ stdlib('c') }} for the outputs, even though no script is being run - it's purely to pick up the right run-exports. I don't feel strongly about which default is better, but I'd like to have consistent and predictable rules for when they do apply. If the rule is that |
That does work, though it's stricter than what conda-build does. Is it necessary to require the trailing |
Define necessary :D I think if you do |
I see no difference (on my CLI) between
I think we have a breakage-budget for the transition that we shouldn't overstretch. The more subtle behaviour changes accumulate, the harder it's going to be to pull off. I think in case of the REs it probably makes sense to pull the trigger on a clean-up. OTOH, for folder-globs I don't see the benefit in terms of clarity gained compared to all the recipe's we'll break -- perhaps silently, because why duplicate in the tests what's already specified under |
I think we can close this, right? Or do you see anything that needs to be done with regards to the implicit |
Whatever RB does with To my understanding, CB (with I think we're mostly on the same page with moving away from magic behaviour, and I like the idea of having to specify the build script also for the global/cache phase (like we discussed above), but it shouldn't be executed IMO for |
rattler-build's behavior is relatively straight-forward: if there is a I would argue that it's bad practice to have a |
Sure, but that's the only way to do it currently. Why do you need to break it? Why do you need to execute |
I am fine with removing the default altogether! |
Same. So I'd be fine with:
|
I mean globally, single- or multi-output recipes not having a default |
That's consistent/compatible with what I said. |
Just to point out I've been trapped the same way by the re-execution of default build script (i.e. |
@h-vetinari @olivier-roussel I think it would be less breaking if we change the behavior of the cache output to not use the What do you think about that? |
It makes sense, I agree with that. |
Yeah. I think we could go so far as just doing away with a default script execution at all (at least if there's more than one output, but then the only consistent thing would be to do it everywhere). Just let users specify the name for the build script of each output. |
Translating zlib to rattler-build, I need to use
cache:
. However, after hacking around a bunch of other issues, it seems thatbuild.sh
gets re-executed -- and then fails, because it's not meant to do that.In particular, I see the following in the logs
The fact that
$SRC_DIR/build
already exists is becausebuild.sh
has already been executed.The text was updated successfully, but these errors were encountered: