Skip to content
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

No way to specify --experimental for render function #56

Open
h-vetinari opened this issue Sep 9, 2024 · 9 comments
Open

No way to specify --experimental for render function #56

h-vetinari opened this issue Sep 9, 2024 · 9 comments
Assignees

Comments

@h-vetinari
Copy link

h-vetinari commented Sep 9, 2024

While trying to switch zlib to rattler, I need a feature that's currently under an experimental flag. Aside from the problem of not being able to specify this through smithy yet, the larger issue is that this is not configurable in the compat layer here.

I've monkey-patched my local install to do:

---src/rattler_build_conda_compat/render.py
+++src/rattler_build_conda_compat/render.py
                    run_args = [
                        "rattler-build",
                        "build",
                        "--render-only",
                        "--recipe",
                        self.path,
                        "--target-platform",
                        platform_and_arch,
                        "--build-platform",
                        platform_and_arch,
+                      "--experimental",
                    ]

which still runs into a rendering error:

  File "E:\miniforge\envs\smithy-dev\Lib\site-packages\rattler_build_conda_compat\render.py", line 317, in render
    m.config.variant = package_variants[0]
                       ~~~~~~~~~~~~~~~~^^^

which I solved as follows:

---src/rattler_build_conda_compat/render.py
+++src/rattler_build_conda_compat/render.py
                        ):
                            package_variants.remove(pkg_variant)

-           m.config.variant = package_variants[0]
+           m.config.variant = package_variants[0] if package_variants else []

            # These are always the full set.  just 'variants' is the one that gets
            #     used mostly, and can be reduced

That way I was able to get a basic rerender to succeed at least (though still running into issues on the build invocation, which'll have to be fixed in smithy).

@h-vetinari
Copy link
Author

@wolfv @baszalmstra @nichmor
Any help with how an API for using --experimental should look like, so that smithy can build on top (conda-forge/conda-smithy#2057).

@nichmor
Copy link
Collaborator

nichmor commented Sep 13, 2024

hey @h-vetinari ! let me take a look at this today! sorry for long reply time

@h-vetinari
Copy link
Author

Gentle ping on this @nichmor :)

@nichmor
Copy link
Collaborator

nichmor commented Oct 3, 2024

hey @h-vetinari - sorry I'm on vacation now - maybe @wolfv or @tdejager will could take a look

@h-vetinari
Copy link
Author

Ping @nichmor @wolfv

@h-vetinari
Copy link
Author

FWIW, I reapplied the monkeypatch to add --experimental to run_args again on the newest 1.2.2, and I'm still running into #58 despite #59, and thus the second patch also remains necessary.

@h-vetinari
Copy link
Author

Image

@h-vetinari
Copy link
Author

conda-forge/conda-smithy#2057 is collecting more and more examples where cache: (and thus --experimental) is needed.

@wolfv
Copy link
Member

wolfv commented Nov 27, 2024

Yes, I think part of the reason why it's "experimental" right now is because we wanted to make sure that the semantics are correct. I think we should fix the issue you discovered on Windows and write up how it works, present that to the conda/conda-forge community and lift it out of experimental late december, early january. How does that sound?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants