Julia 1.9 on macOS modifies bundle contents, causing issues in VSCode

When running Julia in VSCode, I’ve seen this message a few times:

Digging into the syslog a bit (using the log show command), I see this:

2023-05-12 12:27:19.701485-0400 ...   Error       ...    sandboxd: [com.apple.sandbox.reporting:violation] System Policy: julia(77360) deny(1) file-write-data /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/compiled/v1.9/OpenLibm_jll/ToVO1_uHzLa.ji
Violation:       deny(1) file-write-data /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/compiled/v1.9/OpenLibm_jll/ToVO1_uHzLa.ji
Process:         julia [77360]
Path:            /Applications/Julia-1.9.app/Contents/Resources/julia/bin/julia
Load Address:    ...
Identifier:      ???
Version:         ??? (???)
Code Type:       arm64 (Native)
Parent Process:  julia [59169]
Responsible:     /Applications/Visual Studio Code.app/Contents/MacOS/Electron
User ID:         501

Date/Time:       2023-05-12 12:27:18.892 EDT
OS Version:      macOS 13.3.1 (22E261)
Release Type:    User
Report Version:  8

MetaData: {"appbundle-contains-path":true,"normalized_target":["Applications","Julia-1.9.app","Contents","Resources","julia","share","julia","compiled","v1.9","OpenLibm_jll","ToVO1_uHzLa.ji"],"summary":"deny(1) file-write-data \/Applications\/Julia-1.9.app\/Contents\/Resources\/julia\/share\/julia\/compiled\/v1.9\/OpenLibm_jll\/ToVO1_uHzLa.ji","uid":501,"user-approval":"kTCCServiceSystemPolicyAppBundles","matched-user-intent-extension":false,"profile":"platform","platform-binary":false,"platform_binary":"no","policy-description":"System Policy","hardlinked":false,"appbundle-relative-path":"contents\/resources\/julia\/share\/julia\/compiled\/v1.9\/openlibm_jll\/tovo1_uhzla.ji","responsible-process-path":"\/Applications\/Visual Studio Code.app\/Contents\/MacOS\/Electron","responsible-process-signing-id":"com.microsoft.VSCode","platform-policy":true,"path":"\/Applications\/Julia-1.9.app\/Contents\/Resources\/julia\/share\/julia\/compiled\/v1.9\/OpenLibm_jll\/ToVO1_uHzLa.ji","hardware":"J293","appbundle-contains-responsible-binary":false,"matched-extension":false,"storage-class":"kTCCServiceSystemPolicyAppBundles","process-path":"\/Applications\/Julia-1.9.app\/Contents\/Resources\/julia\/bin\/julia","file-mode":420,"profile-flags":0,"responsible-process-team-id":"UBF8T346G9","errno":1,"operation":"file-write-data","build":"macOS 13.3.1 (22E261)","pid":77360,"apple-internal":false,"primary-filter":"path","signing-id":"julia","binary-in-trust-cache":false,"team-id":"A427R7F42H","action":"deny","vnode-type":"REGULAR-FILE","target":"\/Applications\/Julia-1.9.app\/Contents\/Resources\/julia\/share\/julia\/compiled\/v1.9\/OpenLibm_jll\/ToVO1_uHzLa.ji","process_path":["Applications","Julia-1.9.app","Contents","Resources","julia","bin","julia"],"process":"julia","flags":1073741829,"file-flags":0,"primary-filter-value":"\/Applications\/Julia-1.9.app\/Contents\/Resources\/julia\/share\/julia\/compiled\/v1.9\/OpenLibm_jll\/ToVO1_uHzLa.ji","rdev":0,"mount-flags":76583040,"release-type":"User"}

It appears that Julia is trying to write compiled code inside the Julia app bundle, as opposed to in .julia. Since Julia is running inside VSCode, the Mac sees this as VSCode trying to modify Julia and spits out this warning. Is it possible to have julia write .ji files in .julia instead of inside the app bundle?

1 Like