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

Explore alternatives for dev-time references #48

Open
idg10 opened this issue Jun 19, 2023 · 1 comment · May be fixed by #49
Open

Explore alternatives for dev-time references #48

idg10 opened this issue Jun 19, 2023 · 1 comment · May be fixed by #49
Labels
enhancement New feature or request

Comments

@idg10
Copy link
Contributor

idg10 commented Jun 19, 2023

Projects that add a reference to Endjin.RecommendedPractices automatically pick up references to a couple of development-only packages. But we're using an unsupported mechanism to achieve this.

Development-only references are, by definition, not transitive. This makes it tricky to create a NuGet package that causes anything depending on it to pickup references to development-only references. If our package simply has a reference to a development-only package, that will not be picked up transitively by anything using our package.

In general, that's the point of development-only packages. However we do in fact want these references to be pushed out exactly one level deep.

Currently, we achieve this by meddling with the <PackageReference> item group in the .props file this package injects into the build process. However, the docs tell you explicitly not to do this:

https://learn.microsoft.com/en-us/nuget/concepts/msbuild-props-and-targets#guidance-for-the-content-of-msbuild-props-and-targets

@MikeEvansLarah suggested that if the nuspec refers to the relevant dev-only packages, that these might be picked up by anything depending directly on Endjin.RecommendedPractices, without them also being pushed out to indirect dependents. We should see if that works because it would enable us to avoid doing a thing the docs tell you not to, and it might also work better with NuGet tooling - currently, projects using Endjin.RecommendedPractices get suggestions from the NuGet package manager to update these refs, and if a developer accepts that, it messes things up. Also, if this mechanism works, it's possible that dependabot will start offering to update this project appropriate. (Currently, it doesn't understand what we're doing.)

@idg10 idg10 added the enhancement New feature or request label Jun 19, 2023
@MikeEvansLarah
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants