Skip to content

Add directives for removing patches, conflicts and dependencies#33506

Closed
iarspider wants to merge 9 commits intospack:developfrom
iarspider:spack-undepend
Closed

Add directives for removing patches, conflicts and dependencies#33506
iarspider wants to merge 9 commits intospack:developfrom
iarspider:spack-undepend

Conversation

@iarspider
Copy link
Copy Markdown
Contributor

As proposed here: #33057, this is useful for changing recipes via inheritance. I have decided not to touch original directives, since their code is quite complicated

@spackbot-app spackbot-app bot added core PR affects Spack core functionality directives labels Oct 25, 2022
@iarspider iarspider requested a review from scheibelp October 25, 2022 15:15
@iarspider
Copy link
Copy Markdown
Contributor Author

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Oct 25, 2022

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Oct 25, 2022

I was able to run spack style --fix for you!

spack style --fix
==> Running style checks on spack
  selected: isort, mypy, black, flake8
==> Modified files
  lib/spack/spack/directives.py
==> Running isort checks
  isort checks were clean
==> Running mypy checks
Success: no issues found in 556 source files
  mypy checks were clean
==> Running black checks
reformatted lib/spack/spack/directives.py
All done! ✨ 🍰 ✨
1 file reformatted.
  black checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Oct 25, 2022

Why not just extracting the base class somewhere, like in fftw?

@iarspider
Copy link
Copy Markdown
Contributor Author

In some cases (*) we don't want to push changes upstream, since we can't guarantee that every function of the affected package will work - "our tests pass + no one complains = it just works" approach.

(*) Mostly for Python packages we remove version restrictions set by package authors, so some functionality not used by CMS could be affected; also for many packages we remove gettext dependency since we don't need other languages and we need to save on image size

@iarspider
Copy link
Copy Markdown
Contributor Author

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Nov 2, 2022

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Nov 2, 2022

I was able to run spack style --fix for you!

spack style --fix
==> Running style checks on spack
  selected: isort, mypy, black, flake8
==> Modified files
  lib/spack/spack/directives.py
==> Running isort checks
  isort checks were clean
==> Running mypy checks
Success: no issues found in 566 source files
  mypy checks were clean
==> Running black checks
reformatted lib/spack/spack/directives.py
All done! ✨ 🍰 ✨
1 file reformatted.
  black checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> spack style checks were clean
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

@iarspider
Copy link
Copy Markdown
Contributor Author

In some cases (*) we don't want to push changes upstream, since we can't guarantee that every function of the affected package will work - "our tests pass + no one complains = it just works" approach.

(*) Mostly for Python packages we remove version restrictions set by package authors, so some functionality not used by CMS could be affected; also for many packages we remove gettext dependency since we don't need other languages and we need to save on image size

So, TLDR, a different use case: crude hacking of recipe vs special implementation of a common package.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Feb 21, 2023

Superseded by #35045

@iarspider iarspider closed this Nov 12, 2023
@iarspider iarspider deleted the spack-undepend branch November 12, 2023 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts core PR affects Spack core functionality dependencies directives new-version patch tests General test capability(ies)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants