-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
📝 Guidance for what an Sdk looks like #1439
Comments
MSBuild SDKs are very similar to plugins in Gradle. So, we can have a look on their description of plugins- |
A point to consider: what is the difference between SDKs and "normal" When should users use one against the other? |
I have a related use case: bringing in a compiler with targets inside a package that depends on the Sdks installed by the dotnet CLI tooling. How will that work? |
With the current implementation, I don't think there's a way to have a node in the This is because |
I do not wish to write an Sdk myself. I'd rather import targets (that I will write) from a path based on the package root property that is already available by filling in a property in the Sdk that comes with the CLI. The .NET Sdk happens to require a property that points to the targets for a compiler i.e. the Sdk already lets third party languages participate.. I just wanted to know if there will be an official story or if I could just hack my way to something that works. |
@borgdylan Take a look at dotnet/sdk#539. I think if we do that, you will be able to have a compiler in a NuGet package by setting the |
So far language targets has worked for me when setting a hard coded path(I'm still authoring the targets). Once the bug regarding netxy targeting is fixed on non windows I'll try the nuget route as well. |
@borgdylan see About sdk, ihmo can be useful to customize some behaviours, mostly related to restore i think:
|
If LanguageTargets works OK now, I won't need to write an Sdk but only targets files. I don't use Paket with my custom language but normal NuGet. |
@borgdylan paket doesnt matter, was an example of configuration of sdk. For language yes, afaik, you can just use a I used an sdk for F# because like that i can enable |
Shouldn't that work automatically without writing an Sdk? Why does the language specific support have to drive multi-targeting builds? |
@borgdylan @enricosada I'm a little confused following this discussion. How is the LanguageTarget property coming into play here? My team https://github.com/Microsoft/WinObjC is currently just using a nuget package for our compiler + sdk and I want to understand the implications here. |
I have been developing experimental SDKs for my projects. They are experimental, bit of mixed from existing projects, props, targets and some my own to get my projects going. some might not build properly. But I hope these will provide some insight on what I was hoping to achieve! and possibly give a standard for SDKs design! Also #1686 (comment) |
What makes a good Sdk? What functionality must it provide? Should it always include Common.targets? Should we define a new minimum target surface?
What do dependencies look like?
Must every Sdk have both props and targets? Should an Sdk define a version-number that can be used in other Sdks for error checking?
We should pull heavily from the experience of the existing Web and NET Sdks, but temper that with understanding that they were originally defined for something else.
Later edits:
The text was updated successfully, but these errors were encountered: