-
Notifications
You must be signed in to change notification settings - Fork 6
Opt out of centralized package management #339
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
Conversation
Current behavior is that builds are failing when a solution uses centralized package management via Directory.Packages.props files. To prevent this behaviour we are opting out of that centralice package management for generated projects.
|
Hi @janbiehl, thanks for sharing this with us, This looks like a good default! However, I would like to handle the case where someone does want to manage packages via Do you think this is something you can take on yourself? In this PR? You should have enough examples in the repo on how to create such option and how to conditionally render the csproj based on the option. If not, please open a ticket for this, and we will implement it for the next version :) |
- New Option 'useCentralPackageManagement' - Deactive package management by default
|
Hey, I implemented the solution as I understood you. I chose not to activate Central Project Management as the default setting. I also added some unit tests, but I see that some checks are failing. What exactly do I need to do to get the checks to turn green? It's not intuitive to me. Do i have to copy things manually around, or is there a command to get that right? |
Hi @janbiehl , great work! For the fixes make sqlc-generatethen dotnet format --exclude GeneratedProtobuf --exclude examplesalso, please document the added option here - then push everything 🥇 🥇 🥇 |
- Fix formatting issues in CsprojGen and unit tests - Regenerate all examples with useCentralPackageManagement option - Add dotnet-format target to Makefile - Update documentation for the new useCentralPackageManagement option
|
HI, @janbiehl try to update from our main branch and regenerate and push :) |
doron050
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazing!
| ./scripts/generate_protobuf.sh | ||
| ./scripts/generate_protobuf.sh | ||
|
|
||
| dotnet-format: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but if you install the pre-commit this is done for you.
When using centralized package management via
Directory.Packages.propsfiles builds are failing when referencing projects generated by the plugin.To prevent builds from failing the generated projects should opt out from centralized package management. This could either be done via my implemented solution (see changes) or via Directory.Packages.props file that opts out directly inside the generated project.
I don't expect any side effects for applications that are not using centralized package management. But for applications that do use it, it is a nice addition.