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

Make arch and platform inside index.json optional #696

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

0xbe7a
Copy link
Contributor

@0xbe7a 0xbe7a commented Dec 19, 2023

When a noarch package is built, conda-build currently sets the arch and platform fields to null. rattler-build does not even include them when a noarch package is built, as they are optional anyway (see https://docs.conda.io/projects/conda-build/en/stable/resources/package-spec.html#repo-si). This PR sets arch and platform to null instead of panicking if the fields are missing.

@wolfv
Copy link

wolfv commented Dec 19, 2023

Awesome! Did you try and upload a package like this? I am just wondering if some other parts of the Anaconda infrastructure might have problems with these fields missing. We can also change the serde configuration in rattler to emit these fields with null values ...

@0xbe7a
Copy link
Contributor Author

0xbe7a commented Dec 19, 2023

I tried uploading a package created by rattler-build to anaconda, and apart from this small problem, everything worked perfectly. My initial fix was to include the null in the index.json, but it seems that the better solution is to make the anaconda client follow the specification here, since the fields are optional anyway.

Copy link

@travishathaway travishathaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Will ping one more person before merging though.

@dholth
Copy link
Contributor

dholth commented Dec 19, 2023

Reminds me of conda/conda-index#132

Many packages do and many do not include redundant information in the index fragment for repodata.json

@pavelzw
Copy link

pavelzw commented Jan 28, 2024

@vshevchenko-anaconda could you take a look at this PR? Would be great to get this merged.

@vshevchenko-anaconda vshevchenko-anaconda changed the base branch from master to dev February 20, 2024 09:49
@vshevchenko-anaconda vshevchenko-anaconda merged commit 7b157be into anaconda:dev Feb 20, 2024
13 checks passed
@wolfv
Copy link

wolfv commented Feb 20, 2024

yaaay!

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

Successfully merging this pull request may close these issues.

6 participants