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

add add --weak/extra Foo to add to [weakdeps] or [extras] #3708

Merged
merged 3 commits into from
Dec 20, 2023

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Nov 27, 2023

  • check that things that should work do, like rm Foo when Foo is weak
  • add tests
  • add docs
  • add news

@KristofferC
Copy link
Member

Is there even a need to resolve or do anything when adding a weak dependency?

@IanButterworth
Copy link
Member Author

Yeah. Makes sense to skip a bunch of that.

But I'm realizing this probably means Pkg.status, specifically the diff mode, needs to be taught to show weakdeps

(jl_QaDfcG) pkg> add --weak CSV
  No Changes to `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_QaDfcG/Project.toml`
  No Changes to `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_QaDfcG/Manifest.toml`
  No Changes to `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_QaDfcG/Project.toml`
  No Changes to `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_QaDfcG/Manifest.toml`

(jl_QaDfcG) pkg> 

(not sure why it's showing twice here..)

@IanButterworth IanButterworth changed the title add add --weak Foo to add to weakdeps add add --weak/extra Foo to add to [weakdeps] or [extras] Dec 20, 2023
@IanButterworth
Copy link
Member Author

IanButterworth commented Dec 20, 2023

I've generalized this so it can be used for [weakdeps] and [extras]

(jl_oftKv1) pkg> add --weak CSV
       Added CSV to [weakdeps]

(jl_oftKv1) pkg> add --extra CSV
       Added CSV to [extras]

(jl_oftKv1) pkg> add CSV
   Resolving package versions...
    Updating `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_oftKv1/Project.toml`
  [336ed68f] + CSV v0.10.11
    Updating `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_oftKv1/Manifest.toml`
  [336ed68f] + CSV v0.10.11
...

(jl_oftKv1) pkg> st
Status `/private/var/folders/1z/jf841bdj73bdj3vk7kc7f_3w0000gn/T/jl_oftKv1/Project.toml` (empty project)

The only remaining thing is figuring out why the project hash is outdated..

Revert "fix project hash handling"

This reverts commit 33ebbce.

better fix
@IanButterworth IanButterworth merged commit 3c86ba2 into JuliaLang:master Dec 20, 2023
13 checks passed
@IanButterworth IanButterworth deleted the ib/add_weak branch December 20, 2023 20:27
KristofferC pushed a commit that referenced this pull request May 9, 2024
* add `add --weak/extra`

* fix project hash handling

Revert "fix project hash handling"

This reverts commit 33ebbce.

better fix

* fixes
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.

2 participants