Skip to content

Clarify workload extension & platform restrictions #230

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

Merged
merged 4 commits into from
Jul 26, 2021

Conversation

mhutch
Copy link
Contributor

@mhutch mhutch commented Jun 25, 2021

Expand explanation of extending workloads and clarify how platform restrictions interact with it.

| `extends` | string array | IDs of workloads whose packs should be included in this workload. | No |
| `platforms` | string array | Limits the workload and workloads that extend it to only be shown and installed on these host platforms. The strings are RIDs. | No |
| `extends` | string array | IDs of "base" workloads whose packs should be included in this workload. | No |
| `platforms` | string array | Restricts the workload and workloads that extend it to only be shown and installed on these host platforms. Inherits any restrictions imposed by base workloads. The strings are RIDs. | No |
Copy link
Member

Choose a reason for hiding this comment

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

does this only support portable RIDs or the full RID graph? e.g. osx-arm64 vs. osx.11.0-arm64

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It uses the chain in sdk/[VERSION]/NETCoreSdkRuntimeIdentifierChain.txt

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
mhutch added a commit to mhutch/sdk that referenced this pull request Jul 6, 2021
Platform checks should take restrictions on base workloads into account,
as clarified in dotnet/designs#230.
This means that the CLI can no longer trivially display the RIDs for
the platforms on which the workloads are available. This could be added
back in future using the RID graph to coalesce values, but would probably
need additional work to ensure the values were user friendly.

The resolver no longer returns workload definitions. The ensures clients
use the resolver's APIs that work on the composed manifest data. Having
all code that deals with manifest data direct in a central location
helps keep behaviour consistent.

It also does not be return abstract or empty workloads as these
cannot be installed.
@mhutch mhutch requested review from dsplaisted, sfoslund and wli3 July 6, 2021 21:15
This is intended to be used to pre-download NuGet packages referenced by templates so that a workload can work offline after installation. It should be used sparingly i.e. only for NuGets referenced by the core templates with default or popular options.
Library packs are intended to be used to pre-download NuGet packages referenced by templates so that a workload can work offline after installation. Core workloads should include library packs very sparingly, if at all. Instead, it is strongly recommended that library packs are contained in separate workloads with the ID suffix `-offline-templates`. An offline template workload should only contain library packs referenced by templates, and should extend the workload that contains the templates.

> NOTE: SDK targets should **not** implicitly add `PackageReference` items. They should instead add `FrameworkReference` items that resolve to runtime packs and targeting packs.
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't phrase this as strongly, as I think .NET MAUI is going to have implicit PackageReference items.

@jonathanpeppers

Copy link
Member

Choose a reason for hiding this comment

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

Right now the plan with dotnet/maui is to have some implicit PackageReference for things like:

I agree with workloads should include library packs very sparingly, but it doesn't seem like dotnet/maui is doing that at the moment. dotnet/maui probably wouldn't be a good fit with the -offline-templates naming for these either, because they are dependencies for any app.

/cc @Redth

mhutch added a commit to mhutch/sdk that referenced this pull request Jul 13, 2021
Platform checks should take restrictions on base workloads into account,
as clarified in dotnet/designs#230.
This means that the CLI can no longer trivially display the RIDs for
the platforms on which the workloads are available. This could be added
back in future using the RID graph to coalesce values, but would probably
need additional work to ensure the values were user friendly.

The resolver no longer returns workload definitions. The ensures clients
use the resolver's APIs that work on the composed manifest data. Having
all code that deals with manifest data direct in a central location
helps keep behaviour consistent.

It also does not be return abstract or empty workloads as these
cannot be installed.
mhutch added a commit to mhutch/sdk that referenced this pull request Jul 14, 2021
Platform checks should take restrictions on base workloads into account,
as clarified in dotnet/designs#230.
This means that the CLI can no longer trivially display the RIDs for
the platforms on which the workloads are available. This could be added
back in future using the RID graph to coalesce values, but would probably
need additional work to ensure the values were user friendly.

The resolver no longer returns workload definitions. The ensures clients
use the resolver's APIs that work on the composed manifest data. Having
all code that deals with manifest data direct in a central location
helps keep behaviour consistent.

It also does not be return abstract or empty workloads as these
cannot be installed.
mhutch added a commit to mhutch/sdk that referenced this pull request Jul 15, 2021
Platform checks should take restrictions on base workloads into account,
as clarified in dotnet/designs#230.
This means that the CLI can no longer trivially display the RIDs for
the platforms on which the workloads are available. This could be added
back in future using the RID graph to coalesce values, but would probably
need additional work to ensure the values were user friendly.

The resolver no longer returns workload definitions. The ensures clients
use the resolver's APIs that work on the composed manifest data. Having
all code that deals with manifest data direct in a central location
helps keep behaviour consistent.

It also does not be return abstract or empty workloads as these
cannot be installed.
mhutch added a commit to mhutch/sdk that referenced this pull request Jul 15, 2021
Platform checks should take restrictions on base workloads into account,
as clarified in dotnet/designs#230.
This means that the CLI can no longer trivially display the RIDs for
the platforms on which the workloads are available. This could be added
back in future using the RID graph to coalesce values, but would probably
need additional work to ensure the values were user friendly.

The resolver no longer returns workload definitions. The ensures clients
use the resolver's APIs that work on the composed manifest data. Having
all code that deals with manifest data direct in a central location
helps keep behaviour consistent.

It also does not be return abstract or empty workloads as these
cannot be installed.
mhutch added a commit to mhutch/sdk that referenced this pull request Jul 17, 2021
Platform checks should take restrictions on base workloads into account,
as clarified in dotnet/designs#230.
This means that the CLI can no longer trivially display the RIDs for
the platforms on which the workloads are available. This could be added
back in future using the RID graph to coalesce values, but would probably
need additional work to ensure the values were user friendly.

The resolver no longer returns workload definitions. The ensures clients
use the resolver's APIs that work on the composed manifest data. Having
all code that deals with manifest data direct in a central location
helps keep behaviour consistent.

It also does not be return abstract or empty workloads as these
cannot be installed.
@mhutch mhutch merged commit 6633754 into dotnet:main Jul 26, 2021
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.

4 participants