-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
gleam build
doesn't have permission to link priv
on Windows
#3015
Comments
Ah sorry! This is very frustrating. What would be the best thing to do here? Perhaps we can try and link first, but if the linking fails then we can fall back to scanning the priv directory and copying all the files across. It'll be a lot slower but should always work. |
That seems like the only option with the way Windows/rust std works. With some change detection to the contents of the priv directory, the slowness shouldn't be too bad, at least when iterating on just the Gleam code itself. We use this to symlink right now
I think it would be a good idea to emit this warning when it does the copying anyways, so if the user cares about the slowness they know how to fix it. If anyone is curious, here's the way the rust std implements symlinking. Looks like it's already doing all that it can do on Windows. |
I have Rust experience and feel confident that copying the files sounds simple enough. Is someone already working on this? |
Not that I'm aware of |
Already started looking into the issue. Three biggest question would be, if we can write a useful test for this. I can test locally today, but it shouldn't fail in the future. I'll have a look into it :) |
Is GitHub issues the primary communication? The discord server seems to be about using Gleam, not about contributing. |
It is, yes. |
On Windows running
gleam build
on a project with apriv
directory will error. This seems to be caused by a Windows-specific symlink behaviour.https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/
You can enable "Developer Mode", which will grant the symlink permission.
If there's no easy way to fix this, then printing out a warning to enable this setting would probably be okay.
Using Gleam v1.1.0
Reproducing:
The text was updated successfully, but these errors were encountered: