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

include virtual packages in hash contents #4606

Merged
merged 14 commits into from
May 5, 2023
Merged

Conversation

isuruf
Copy link
Contributor

@isuruf isuruf commented Oct 29, 2022

Description

Noarch packages that use virtual packages have the virtual packages added to the hash contents of the package.
This facilitates the building of noarch packages multiple times for different platforms with platform specific dependencies.

If we build noarch packages with diverging run dependencies for different platforms, the hash in the build string stayed the same prior to this PR, i.e., the built variants got the exact same build strings and thus package file names didn't change.
With this PR we can build different variants for, e.g., __linux/__osx/__win, and get distinguished, non-clashing package file names.

Resolves #4861.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Oct 29, 2022
@jaimergp
Copy link
Contributor

For context, we need this as part of the work being done at conda-forge/conda-forge.github.io#1840, following approach documented at conda-forge/conda-forge.github.io#1839

@jakirkham
Copy link
Member

cc @jezdez

Copy link
Member

@mbargull mbargull left a comment

Choose a reason for hiding this comment

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

LGTM; just small suggestions for extending the test a little bit.

- colorama # [win]
- __win # [win]
- appnope # [osx]
- __osx # [osx]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- __osx # [osx]
- __osx # [osx]
- __linux # [ppc64le]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've gone with __linux # [linux]. I don't think it's a good idea to use ppc64le as the selector here as the selector and the virtual package differs.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, semantically the recipe doesn't makes sense. However, I changed it that way to let the test cover more cases, i.e., without it, we don't test whether the hash changes or not depending on if we have a virtual package dep on the same platform (OS) or not.

Copy link
Member

Choose a reason for hiding this comment

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

Do we have virtual architecture packages?

Copy link
Member

Choose a reason for hiding this comment

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

Does the archspec virtual package count?

Copy link
Member

Choose a reason for hiding this comment

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

Interesting. How would this be used? Maybe something like this?

Suggested change
- __osx # [osx]
- __osx # [osx]
- __archspec * ppc64le # [ppc64le]

Copy link
Contributor

Choose a reason for hiding this comment

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

Tried it locally and it works!

Copy link
Contributor

Choose a reason for hiding this comment

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

Patched the test to cover for John's comment in this other suggestion. Would that work @mbargull?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's only true when archspec is not installed and is a fallback. Otherwise you get values like power9, power10 etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, it passes with or without archspec in my dev env 🤷

@jezdez
Copy link
Member

jezdez commented Nov 17, 2022

I've just updated the PR description with what had been written in the news file contained in this PR and I don't understand why this wasn't done initially when this was opened.

It would help the review process, especially for the people relatively new to the code base like myself, compared to those that have plenty of experience working with it every day.

To be clear, it adds stop energy to the review process if there is:

If this feature request is important for conda-forge, it must be filed as an issue in this repo, to be referenced during the code review, not the least for future code archeologists and consensus finding.

I understand that filing issues has probably been dismissed as not helpful in the past, for various reasons (read: bad maintenance patterns), but I'd appreciate your help in making it easier for me and my colleagues to review your suggested changes. That would seriously help to unblock you as well I think.

Thank you for your contributions -- as always -- @isuruf!

@jakirkham
Copy link
Member

What are the next steps here?

@jaimergp
Copy link
Contributor

jaimergp commented Jan 5, 2023

One of the tests added in this PR is failing with a setattr problem in the config. Maybe a bad key somewhere?

@jakirkham
Copy link
Member

This seems to be lingering a bit. How can we help move this forward?

@isuruf
Copy link
Contributor Author

isuruf commented Feb 16, 2023

I don't have the time to work on this PR. Anyone wants to take over?

@jakirkham
Copy link
Member

No worries. Should add that question wasn't directed at you specifically, but to this group as a whole. It's not obvious what still needs to be done to merge. For example there are outdated review comments above. Another review might clarify what's still needed.

@beeankha
Copy link
Member

Hi @isuruf and @jakirkham ! Several conda-core dev team members are out of office currently but I'll bring this up early next week to see if we can get this moving (or at least get a timeline/update for you). Apologies for the delay!

@jakirkham
Copy link
Member

Thanks Bianca! 🙏

No worries. Things slip through the cracks sometimes.

Just want to make sure that we pick this one back up if possible.

@isuruf
Copy link
Contributor Author

isuruf commented Feb 16, 2023

I think @jezdez's comment still applies

If this feature request is important for conda-forge, it must be filed as an issue in this repo, to be referenced during the code review, not the least for future code archeologists and consensus finding.

I understand that filing issues has probably been dismissed as not helpful in the past, for various reasons (read: bad maintenance patterns), but I'd appreciate your help in making it easier for me and my colleagues to review your suggested changes. That would seriously help to unblock you as well I think.

So, someone should open an issue with a description. @mbargull added a good description for the top post here. We can copy that and add more context if needed.

@h-vetinari
Copy link
Contributor

So, someone should open an issue with a description.

Done: #4861

jezdez
jezdez previously approved these changes May 3, 2023
Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

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

Thanks for elaborating in the ticket and providing the additional context, everyone!

@jezdez jezdez requested review from mbargull and chenghlee May 3, 2023 18:09
@jezdez jezdez force-pushed the virtual_hash branch 2 times, most recently from 4c9d5b3 to 97c2240 Compare May 3, 2023 19:55
isuruf and others added 7 commits May 3, 2023 22:13
Co-authored-by: Marcel Bargull <mbargull@users.noreply.github.com>
Co-authored-by: Marcel Bargull <mbargull@users.noreply.github.com>
@jezdez
Copy link
Member

jezdez commented May 3, 2023

pre-commit.ci autofix

Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
@beeankha
Copy link
Member

beeankha commented May 4, 2023

pre-commit.ci autofix

beeankha
beeankha previously approved these changes May 4, 2023
@jezdez
Copy link
Member

jezdez commented May 5, 2023

@mbargull Any chance to re-review this?

@beeankha beeankha dismissed mbargull’s stale review May 5, 2023 14:53

Tests have been extended

@beeankha beeankha merged commit ccc3e81 into conda:main May 5, 2023
@jakirkham
Copy link
Member

Thanks all! 🙏

@isuruf isuruf deleted the virtual_hash branch May 5, 2023 17:38
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Include virtual packages in hash contents
8 participants