!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

126 Members
24 Servers

Load older messages


SenderMessageTime
10 Jan 2025
@6pak:matrix.org6pakbecause link would mean you still have everything in closure, copy means you have the same thing twice in store/cache17:04:58
@corngood:corngood.comCorngoodright, I thought it would be better to favour build closure size for dependent projects17:05:49
@6pak:matrix.org6pak

You do need to define the list of packages at eval time, which is annoying.

can't you do it at fetch-deps stage?

17:05:55
@corngood:corngood.comCorngood
$ cat result/share/nuget/source/avalonia/11.0.11/avalonia.nuspec
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>Avalonia</id>
    <version>11.0.11</version>
    <authors>Avalonia Team</authors>
    <license type="expression">MIT</license>
    <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
    <icon>Icon.png</icon>
    <projectUrl>https://avaloniaui.net/</projectUrl>
    <description>Avalonia is a cross-platform UI framework for .NET providing a flexible styling system and supporting a wide range of Operating Systems such as Windows, Linux, macOS and with experimental support for Android, iOS and WebAssembly.</description>
    <releaseNotes>https://github.com/AvaloniaUI/Avalonia/releases</releaseNotes>
    <copyright>Copyright 2013-2025 © The AvaloniaUI Project</copyright>
    <tags>avalonia avaloniaui mvvm rx reactive extensions android ios mac forms wpf net netstandard net461 uwp xamarin</tags>
    <repository type="git" url="https://github.com/AvaloniaUI/Avalonia/" />
    <dependencies>
      <group targetFramework=".NETFramework4.6.1">
        <dependency id="Avalonia.Remote.Protocol" version="11.0.11" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" exclude="Build,Analyzers" />
        <dependency id="System.ComponentModel.Annotations" version="4.5.0" exclude="Build,Analyzers" />
        <dependency id="System.Memory" version="4.5.3" exclude="Build,Analyzers" />
        <dependency id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" exclude="Build,Analyzers" />
        <dependency id="System.Threading.Tasks.Extensions" version="4.5.4" exclude="Build,Analyzers" />
        <dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
        <dependency id="MicroCom.Runtime" version="0.11.0" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETCoreApp2.0">
        <dependency id="Avalonia.Remote.Protocol" version="11.0.11" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" exclude="Build,Analyzers" />
        <dependency id="System.ComponentModel.Annotations" version="4.5.0" exclude="Build,Analyzers" />
        <dependency id="System.Memory" version="4.5.3" exclude="Build,Analyzers" />
        <dependency id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" exclude="Build,Analyzers" />
        <dependency id="System.Threading.Tasks.Extensions" version="4.5.4" exclude="Build,Analyzers" />
        <dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
        <dependency id="MicroCom.Runtime" version="0.11.0" exclude="Build,Analyzers" />
      </group>
      <group targetFramework="net6.0">
        <dependency id="Avalonia.Remote.Protocol" version="11.0.11" exclude="Build,Analyzers" />
        <dependency id="System.ComponentModel.Annotations" version="4.5.0" exclude="Build,Analyzers" />
        <dependency id="MicroCom.Runtime" version="0.11.0" exclude="Build,Analyzers" />
      </group>
      <group targetFramework=".NETStandard2.0">
        <dependency id="Avalonia.Remote.Protocol" version="11.0.11" exclude="Build,Analyzers" />
        <dependency id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" exclude="Build,Analyzers" />
        <dependency id="System.ComponentModel.Annotations" version="4.5.0" exclude="Build,Analyzers" />
        <dependency id="System.Memory" version="4.5.3" exclude="Build,Analyzers" />
        <dependency id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" exclude="Build,Analyzers" />
        <dependency id="System.Threading.Tasks.Extensions" version="4.5.4" exclude="Build,Analyzers" />
        <dependency id="System.ValueTuple" version="4.5.0" exclude="Build,Analyzers" />
        <dependency id="MicroCom.Runtime" version="0.11.0" exclude="Build,Analyzers" />
      </group>
    </dependencies>
  </metadata>
</package>%
17:06:09
@6pak:matrix.org6paklike the info you need is literally in nuget restore metadata17:06:09
@corngood:corngood.comCorngood then you're using packages from nuget.org or something. maybe if you had fetch-deps use the master avalonia package/? 17:06:48
@corngood:corngood.comCorngood * then you're using packages from nuget.org or something. maybe if you had fetch-deps use the master avalonia package? 17:06:50
@6pak:matrix.org6pakbut different outputs would solve it with no negatives right? (assuming they work how I think they do)17:06:50
@6pak:matrix.org6pakoh you mean a list in consuming projects?17:07:27
@corngood:corngood.comCorngoodit wouldn't be different from having separate derivations17:07:29
@6pak:matrix.org6pakyou would build avalonia twice17:07:44
@6pak:matrix.org6pak* you would build avalonia once17:07:54
@corngood:corngood.comCorngoodoh I see. I guess it would save storing the monolithic output, but that wouldn't be used directly by anything17:08:45
@6pak:matrix.org6pakunless with the copy approach you would make the monolith uncacheable, which also works I guess?17:08:52
@6pak:matrix.org6pakbut it feels like the outputs thing was literally designed for this17:09:16
@corngood:corngood.comCorngood I pasted the nuspec above to show the dependencies. If they were all separate, you'd have to do buildInputs = [ avalonia avalonia-remote-protocol ], etc. 17:09:52
@corngood:corngood.comCorngoodUnless we teach the builder to understand those dependencies and propagate them.17:10:13
@6pak:matrix.org6pakcan't you just use propagatedBuildInputs?17:10:28
@corngood:corngood.comCorngood

yeah, but you need to get the dependencies from the nuspec:

      <group targetFramework="net6.0">
        <dependency id="Avalonia.Remote.Protocol" version="11.0.11" exclude="Build,Analyzers" />
17:10:56
@corngood:corngood.comCorngoodand they depend on target frameworks, etc17:11:12
@6pak:matrix.org6pakyou could get it at avalonia's fetch-deps stage17:11:28
@6pak:matrix.org6paknuget restore includes figuring out projectreferences metadata17:11:44
@corngood:corngood.comCorngoodit's the output of avalonia, so I think you'd have to do it in the dependent project's fetch phase?17:11:59
@corngood:corngood.comCorngoodoh wait, I see what you mean17:12:10
@corngood:corngood.comCorngoodyeah, maybe fetch-deps could determine something about the output packages. but still you have dependencies that are dependent on TFM. so a dependent project on net6.0 and netstandard2.0 might have different dependencies. you could be conservative and link all of them I guess17:12:58
@6pak:matrix.org6pakthis would be bad though17:13:02
@corngood:corngood.comCorngoodI didn't completely give up on it. this is just where it started to get hairy and I was trying to use the nuget sdk to figure out dependencies etc17:13:43
@6pak:matrix.org6paktbh listing it out manually might not be that bad17:14:11
@corngood:corngood.comCorngoodyeah, maybe not. avalonia is probably about as complex as it gets17:14:31
@6pak:matrix.org6pakyeah17:14:37

Show newer messages


Back to Room ListRoom Version: 9