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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust Analyser + Symlink to Apps on MacOs = 馃く #13

Closed
ierehon1905 opened this issue Aug 11, 2021 · 8 comments
Closed

Rust Analyser + Symlink to Apps on MacOs = 馃く #13

ierehon1905 opened this issue Aug 11, 2021 · 8 comments

Comments

@ierehon1905
Copy link

Hello, thank you for awesome template.

I encountered issues using it with rust-analyser, it seems that it tried to analyse everything (ok) and even went through symlinks (not ok). Project could not be compiled and everything I got was:

Blocking waiting for file lock on build directory

I was able to solve the issue by deleting the symlink to Applications.
Is this symlink necessary?

@ierehon1905 ierehon1905 changed the title Rust Analyser + Symlink to Apps = 馃く Rust Analyser + Symlink to Apps on MacOs = 馃く Aug 11, 2021
@NiklasEi
Copy link
Owner

The link is used in macOS builds. Mac users can drag and drop the game into their Applications directory (which seems to be standard for installing mac applications).

Maybe you can tell rust-analyser to ignore the build directory? You are using VS code, right? In that case, it would be awesome if we could add a configuration preventing this problem in .vscode. So others don't have to figure it out again.

@NiklasEi
Copy link
Owner

If that is not possible, we could try to create the symlink during packaging instead of having it in the repository.

@ierehon1905
Copy link
Author

Ok, so here is what I have tried unsuccessfully :(

.vscode/settings.json

{
  "rust-analyzer.files.excludeDirs": ["build"],
  "files.watcherExclude": {
    ...
    "**/build/macos/**": true
  }
}

@ierehon1905
Copy link
Author

Oh, just found out that it may be not our fault )))

rust-lang/rust-analyzer/issues/7755

So...

@ian-h-chamberlain
Copy link

This symlink to /Applications also caused issues for me when simply using cargo run as well.

I added this to my VSCode settings at first:

  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/Thumbs.db": true,

    "build/macos/src/Applications": true,
  }

But still ran into build problems until I removed the symlink (seems to be related to rust-lang/cargo#8183):

error: failed to determine package fingerprint for build script for cruise-control v0.1.0 (/Users/ianchamberlain/Documents/Development/cruise-control)

Caused by:
  failed to determine the most recently modified file in /Users/ianchamberlain/Documents/Development/cruise-control

Caused by:
  failed to determine list of files in /Users/ianchamberlain/Documents/Development/cruise-control

Caused by:
  cannot read "/Users/ianchamberlain/Documents/Development/cruise-control/build/macos/src/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/private/var/mobile"

Caused by:
  Permission denied (os error 13)

I just deleted the symlink and all seems to be working as expected now...

@NiklasEi
Copy link
Owner

If this keeps making trouble I guess it's time to look into generating the symlink when packaging a macOS build.

@NiklasEi
Copy link
Owner

I just pushed a commit that removes the symlink and instead creates it only during the macOS build. Could you please verify that your issues with the symlink are now gone? Since you have access to a mac: could you please also check if the latest macOS build is still installable via drag and drop to /Applications?

@ian-h-chamberlain
Copy link

Both the original issue seems to be gone, and I can install the test app from the .dmg by drag and drop to /Applications.

Thanks for this! I think this issue can be closed now.

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

3 participants