fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Replace Dotnet.ProjInf with Ionide.ProjInfo.

Open nojaf opened this issue 3 years ago • 3 comments

As mentioned in https://github.com/dotnet/fsharp/discussions/13646. I would later like to use this in my test over at https://github.com/safesparrow/fsharp/pull/1.

nojaf avatar Aug 10 '22 08:08 nojaf

@vzarytovskii looks like I'm still missing a dependency

tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj(0,0): error NU1101: (NETCORE_ENGINEERING_TELEMETRY=Restore) Unable to find package SemanticVersioning. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet-tools, dotnet5, dotnet5-transport, vs-impl, vssdk

nojaf avatar Aug 10 '22 08:08 nojaf

@vzarytovskii looks like I'm still missing a dependency

tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj(0,0): error NU1101: (NETCORE_ENGINEERING_TELEMETRY=Restore) Unable to find package SemanticVersioning. No packages exist with this id in source(s): dotnet-eng, dotnet-public, dotnet-tools, dotnet5, dotnet5-transport, vs-impl, vssdk

Is it the only one missing? Will the last version work, or some specific one is required?

vzarytovskii avatar Aug 10 '22 09:08 vzarytovskii

Is it the only one missing? Will the last version work, or some specific one is required?

Yeah, the latest should work.

nojaf avatar Aug 10 '22 09:08 nojaf

@vzarytovskii last week I was finally able to deduce that the current approach is never going to work.

The project FSharp.Compiler.Service contains direct dependencies to

    <PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" />
    <PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildVersion)" />
    <PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />

which conflicts with the dynamic loading of the correct MSBuild assemblies that Ionide.ProjInfo is trying to apply. There are some unit tests depending on this, so we cannot alter FSharp.Compiler.Service.Tests.

Would you be ok with having an additional unit test project where we can exclude these references at runtime in order for ProjInfo to work as expected?

nojaf avatar Aug 22 '22 08:08 nojaf

@vzarytovskii last week I was finally able to deduce that the current approach is never going to work.

The project FSharp.Compiler.Service contains direct dependencies to

    <PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" />
    <PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildVersion)" />
    <PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />

which conflicts with the dynamic loading of the correct MSBuild assemblies that Ionide.ProjInfo is trying to apply. There are some unit tests depending on this, so we cannot alter FSharp.Compiler.Service.Tests.

Would you be ok with having an additional unit test project where we can exclude these references at runtime in order for ProjInfo to work as expected?

I guess it'll be ok, as long as we constraint it to have specific type of tests.

vzarytovskii avatar Aug 22 '22 08:08 vzarytovskii

@vzarytovskii am I still missing anything for this new test project?

nojaf avatar Aug 23 '22 07:08 nojaf