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

load extensions with fewer triggers earlier #49891

Merged
merged 3 commits into from
Oct 30, 2024
Merged

load extensions with fewer triggers earlier #49891

merged 3 commits into from
Oct 30, 2024

Conversation

KristofferC
Copy link
Member

Aimed to support the use case in #48734 (comment).

https://github.com/KristofferC/ExtSquared.jl is an example, see specifically https://github.com/KristofferC/ExtSquared.jl/blob/ded7c57d6f799674e3310b8174dfb07591bbe025/ext/BExt.jl#L4.

I think this makes sense, happy for a second pair of eyes though.

cc @termi-official

@KristofferC KristofferC requested a review from vtjnash May 19, 2023 14:51
topolarity added a commit to topolarity/julia that referenced this pull request Oct 28, 2024
This allows for one extension to depend on another if its triggers are
a strict superset of the other's. For example, in a Project.toml:

```toml
[extensions]
PlottingExt = "Plots"
StatisticsPlottingExt = ["Plots", "Statistics"]
```

Here `StatisticsPlottingExt` is allowed to depend on `PlottingExt`
This provides a way to declare `ext → ext` dependencies while still
avoiding any extension cycles. The same trick can also be used to make
an extension in one package depend on an extension provided in another.

Also requires something like JuliaLang#49891, so that we guarantee these load in
the right order.
topolarity added a commit to topolarity/julia that referenced this pull request Oct 29, 2024
This allows for one extension to depend on another if its triggers are
a strict superset of the other's. For example, in a Project.toml:

```toml
[extensions]
PlottingExt = "Plots"
StatisticsPlottingExt = ["Plots", "Statistics"]
```

Here `StatisticsPlottingExt` is allowed to depend on `PlottingExt`
This provides a way to declare `ext → ext` dependencies while still
avoiding any extension cycles. The same trick can also be used to make
an extension in one package depend on an extension provided in another.

Also requires something like JuliaLang#49891, so that we guarantee these load in
the right order.
@topolarity topolarity added the backport 1.11 Change should be backported to release-1.11 label Oct 29, 2024
@topolarity topolarity merged commit 717bf54 into master Oct 30, 2024
5 of 7 checks passed
@topolarity topolarity deleted the kc/n_triggers branch October 30, 2024 15:01
topolarity added a commit that referenced this pull request Oct 30, 2024
Aimed to support the use case in
#48734 (comment).

https://github.com/KristofferC/ExtSquared.jl is an example, see
specifically
https://github.com/KristofferC/ExtSquared.jl/blob/ded7c57d6f799674e3310b8174dfb07591bbe025/ext/BExt.jl#L4.

I think this makes sense, happy for a second pair of eyes though.

cc @termi-official

---------

Co-authored-by: KristofferC <[email protected]>
Co-authored-by: Cody Tapscott <[email protected]>
@topolarity topolarity removed the backport 1.11 Change should be backported to release-1.11 label Oct 30, 2024
topolarity added a commit to topolarity/julia that referenced this pull request Oct 30, 2024
This allows for one extension to depend on another if its triggers are
a strict superset of the other's. For example, in a Project.toml:

```toml
[extensions]
PlottingExt = "Plots"
StatisticsPlottingExt = ["Plots", "Statistics"]
```

Here `StatisticsPlottingExt` is allowed to depend on `PlottingExt`
This provides a way to declare `ext → ext` dependencies while still
avoiding any extension cycles. The same trick can also be used to make
an extension in one package depend on an extension provided in another.

Also requires something like JuliaLang#49891, so that we guarantee these load in
the right order.
topolarity added a commit to topolarity/julia that referenced this pull request Oct 30, 2024
This allows for one extension to depend on another if its triggers are
a strict superset of the other's. For example, in a Project.toml:

```toml
[extensions]
PlottingExt = "Plots"
StatisticsPlottingExt = ["Plots", "Statistics"]
```

Here `StatisticsPlottingExt` is allowed to depend on `PlottingExt`
This provides a way to declare `ext → ext` dependencies while still
avoiding any extension cycles. The same trick can also be used to make
an extension in one package depend on an extension provided in another.

Also requires something like JuliaLang#49891, so that we guarantee these load in
the right order.
KristofferC pushed a commit that referenced this pull request Oct 31, 2024
… strict superset (#56368)

This is an effort at a proper workaround (feature?) to resolve
#56204.

For example:
```toml
[extensions]
PlottingExt = "Plots"
StatisticsPlottingExt = ["Plots", "Statistics"]
```

Here `StatisticsPlottingExt` is allowed to depend on `PlottingExt` This
provides a way to declare `ext → ext` dependencies while still avoiding
any extension cycles. The same trick can also be used to make an
extension in one package depend on an extension provided in another.

We'll also need to land #49891, so that we guarantee these load in the
right order.
topolarity added a commit to topolarity/julia that referenced this pull request Oct 31, 2024
…ng#56368)

This is an effort at a proper workaround (feature?) to resolve
JuliaLang#56204.

For example:
```toml
[extensions]
PlottingExt = "Plots"
StatisticsPlottingExt = ["Plots", "Statistics"]
```

Here `StatisticsPlottingExt` is allowed to depend on `PlottingExt` This
provides a way to declare `ext → ext` dependencies while still avoiding
any extension cycles. The same trick can also be used to make an
extension in one package depend on an extension provided in another.

We'll also need to land JuliaLang#49891, so that we guarantee these load in the
right order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants