| 17 Dec 2024 |
GGG | It doesn't, and in .NET most projects don't bother to filter deps by runtime id either | 22:11:00 |
GGG | So if we want that it's something we'd have to do manually or have said benefit for the small amount of projects that do | 22:11:28 |
GGG | I'm unsure how many savings that would actually bring us | 22:11:39 |
6pak | every project with an apphost does | 22:11:40 |
GGG | I mean, the packages with native libs do, but other than those, idk | 22:12:14 |
6pak | seeing how cross compilation was completely broken until recently, no one cares tbf | 22:12:28 |
6pak | my issue with buildDotnetModule is that you have things like packNupkg and selfContainedBuild top level and they apply to all projects | 22:15:34 |
6pak | so the model of a nix derivation and .net project seem disconnected | 22:15:50 |
GGG | How would you suggest it work though | 22:16:17 |
Corngood | I would like to move away from buildDotnetModule personally, and use something based on dotnet-sdk hooks. The avalonia package was a bit of a test case for this. | 22:16:25 |
6pak | you can't easily linux-x64 publish one project and nuget pack another from one solution | 22:16:31 |
6pak | because from one side buildDotnetModule properties are global for all projects | 22:16:43 |
6pak | and from another you can't easily break up subprojects into multiple nix derivations because of how msbuild projectreferences work | 22:16:59 |
GGG | Yeah, but that's a non-objective really, most `buildX` that I know of don't let you have multiple outputs | 22:17:04 |
6pak | I see a projectReferences property in buildDotnetModule which sounds nice in theory, but in practice msbuild treats projectreferences very differently to packagereferences | 22:17:25 |
6pak | which is a pet peeve of mine | 22:17:30 |
6pak | but ^ | 22:18:32 |
6pak | if we can't nicely break up subprojects into nix derivation because of how msbuild works | 22:18:43 |
6pak | imo exposing procedural bash helpers instead is the way to go | 22:18:56 |
GGG | Like, if you build both a program and a nuget package, you'd want them in separate packages, because it makes no sense to have a single package with both as a user of either doesn't need the other | 22:18:59 |
6pak | so you can just decide what you want to build in buildPhase | 22:19:02 |
6pak | and have a flexible way to gather nuget deps | 22:19:13 |
GGG | In reply to @6pak:matrix.org imo exposing procedural bash helpers instead is the way to go That's not the standard in nixpkgs currently though | 22:19:14 |
GGG | It'd be very confusing | 22:19:18 |
Corngood | projectReferences is just buildInputs now | 22:19:28 |
GGG | And inconsistent with the rest of nixpkgs | 22:19:29 |
GGG | I'd rather have buildDotnetModule but also be able to use individual helpers to do the more complicated stuff if people want. | 22:19:59 |
6pak | yeah I just mean you can't easily replace ProjectReference with PackageReference in msbuild | 22:20:22 |
6pak | both have their own quirks | 22:20:26 |
6pak | with former you can specify a different target to build and do crazy stuff | 22:20:58 |