Skip to content

Commit

Permalink
Nikolche shorten comment
Browse files Browse the repository at this point in the history
  • Loading branch information
erdembayar committed Apr 10, 2023
1 parent df9cca9 commit 30d1a77
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions proposed/2022/PrivateAssetIndepdentFromExcludeAsset.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@
## Summary

<!-- One-paragraph description of the proposal. -->
Currently asset consumption via `PrivateAssets` option experience for assets from transitive package in a project/package is not fully controllable by the project author for parent consuming project, here `PrivateAssets` option calculation is not independent from `IncludeAssets/ExcludeAssets` option, if an asset is not consumed in current project then it doesn't flow up the regardless of `PrivateAssets` option.
Currently, given a package within a project, what assets from the package/project flow transitive to a parent project is determined by PrivateAssets in combination with IncludeAssets/ExcludeAssets. In order for an asset to flow the parent, it has to be consumed by the current project.
This proposal introduces new a boolean `ExcludedAssetsFlow` metadata to allow for `PrivateAssets` option to be independent from `IncludeAssets/ExcludeAssets` metadata, as it'll allow assets not specified in `PrivateAssets` to flow regardless of `IncludeAssets/ExcludeAssets` metadata.

Below means assets `contentFiles, build, buildMultitargeting, buildTransitive, analyzers, native` excluding `runtime and compile` assets would flow to referencing parent project even though they're not consumed by current project.

`<PackageReference Include="PackageA" PrivateAssets="Runtime;Compile" ExcludedAssetsFlow="true" IncludeAssets = "none"/>`

If `ExcludedAssetsFlow` if not present, then it default false and it's ignored by older tooling. Also, if it has non-boolean value then it would error out.
In below both `Consumption via package reference` and `Consumption via project reference` sub-sections are explaining same things for 2 different scenarios in details.

### Consumption via package reference

The `IncludeAssets`/`ExcludeAssets`, and `PrivateAssets` metadata on `PackageReference` items control two different features. Firstly, which assets from a package that are included in the current project. Secondly, whether the assets will be listed in the package's dependency assets, for those assets to flow transitively, if the project is packed or restored.
Expand Down

0 comments on commit 30d1a77

Please sign in to comment.