Skip to content
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

FAKE.DotNet.Cli / Mono.Posix / Symlinks #2790

Open
Numpsy opened this issue Jul 28, 2024 · 1 comment
Open

FAKE.DotNet.Cli / Mono.Posix / Symlinks #2790

Numpsy opened this issue Jul 28, 2024 · 1 comment

Comments

@Numpsy
Copy link
Contributor

Numpsy commented Jul 28, 2024

A thought (as yet not investigated in any more detail than this)

Fake currently has a dependency on Mono.Posix.NetStandard to get the 'GetRealPath' function to resolve symlinks:

Mono.Unix.UnixPath.GetRealPath(dotnetTool) |> Path.GetDirectoryName

That caused a problem on ARM CPU macs due to the lack of an ARM build of the native code part of that package.

I tried updating it to the newer Mono.Unix package in #2781 back that failed with other issues.

So, I was reading about a little for ideas and noticed that .NET 6.0 now has a built in 'ResolveLinkTarget' function that does this sort of thing with no external dependencies:
https://learn.microsoft.com/en-us/dotnet/api/system.io.file.resolvelinktarget?view=net-6.0

So - I wonder if it be possible to use that for .NET 6.0 builds and avoid the Mono.Unix dependency?

@xperiandri
Copy link
Collaborator

Let's try. Removing a dependency because of built-in functionality is always good 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants