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 option to create ext when adding weakdeps #4016

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IanButterworth
Copy link
Sponsor Member

@IanButterworth IanButterworth commented Sep 8, 2024

Closes #3549

Screenshot 2024-09-08 at 8 28 34 AM

Creates

...
[weakdeps]
Chairmarks = "0ca39b1e-fe0b-4e98-acfc-b1656634c4de"
Example = "7876af07-990d-54b4-ab0e-23690620f79a"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"

[extensions]
ChairmarksImageIOExt = ["Chairmarks", "ImageIO"]
ExampleExt = ["Example"]

Note that this follows the naming guidance in #4000

TODO

  • Tests
  • Docs
  • Also create ext/ExampleExt/ExampleExt.jl with boilerplate?

@KristofferC
Copy link
Sponsor Member

I'm bit sure this should be part of add. It feels more like a generate thing.

@IanButterworth
Copy link
Sponsor Member Author

I think there's elements of both. Not sure generate should add a weak dep, conversely.

It could be two steps:

pkg> add --weak Foo
pkg> generate --extension Foo

So those each are logical to add.

But for convenience I think offering to do the generate as part of add seems common enough to make sense.

Perhaps the default for noninteractive should be "n" though, so that would require two api calls.

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.

Make add --weak automatically create extension entries
2 participants