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

Julia-1.0.app Permission denied #235

Closed
ludwigwinkler opened this issue Oct 29, 2018 · 46 comments
Closed

Julia-1.0.app Permission denied #235

ludwigwinkler opened this issue Oct 29, 2018 · 46 comments
Assignees
Labels
execution When running Julia codes platform: macOS user experience User experience
Milestone

Comments

@ludwigwinkler
Copy link

Hi,
I installed the plugin in PyCharm and Julia 1.0 and and set the Julia executable to
"/Applications/Julia-1.0.app/Contents/Resources/julia/bin/julia".

screen shot 2018-10-29 at 14 05 51

Unfortunately I can't execute any Julia code as I get the following error:

screen shot 2018-10-29 at 14 02 53

Would anybody have an idea on what to do?

Thank you in advance.
Cheers!

@ice1000
Copy link
Member

ice1000 commented Oct 29, 2018

Could you please show your project configuration?
If you're not sure, close PyCharm and upload your workspace.xml here.

Don't worry, it's just some metadata of your project which helps us debug, it doesn't have much private information.

@ice1000 ice1000 added the execution When running Julia codes label Oct 29, 2018
@ice1000 ice1000 self-assigned this Oct 29, 2018
@ludwigwinkler
Copy link
Author

ludwigwinkler commented Oct 30, 2018

Hi,

here you go. Thank you again for all the work!

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="1a472be0-3f8f-4a3b-97bc-07acee0fffc5" name="Default" comment="" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="FavoritesManager">
    <favorites_list name="Julia" />
  </component>
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="Pi.jl" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/Pi.jl">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="170">
              <caret line="10" column="2" selection-start-line="10" selection-start-column="2" selection-end-line="10" selection-end-column="2" />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Laplacian.jl" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/Graph/Laplacian.jl">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="289">
              <caret line="17" lean-forward="true" selection-start-line="17" selection-end-line="17" />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/Pi.jl" />
        <option value="$PROJECT_DIR$/Graph/Laplacian.jl" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
    <sorting>DEFINITION_ORDER</sorting>
  </component>
  <component name="ProjectFrameBounds" fullScreen="true">
    <option name="y" value="23" />
    <option name="width" value="2560" />
    <option name="height" value="1417" />
  </component>
  <component name="ProjectView">
    <navigator proportions="" version="1">
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <expand>
            <path>
              <item name="Julia" type="b2602c69:ProjectViewProjectNode" />
              <item name="Julia" type="462c0819:PsiDirectoryNode" />
            </path>
            <path>
              <item name="Julia" type="b2602c69:ProjectViewProjectNode" />
              <item name="Julia" type="462c0819:PsiDirectoryNode" />
              <item name="Graph" type="462c0819:PsiDirectoryNode" />
            </path>
            <path>
              <item name="Julia" type="b2602c69:ProjectViewProjectNode" />
              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
            </path>
          </expand>
          <select />
        </subPane>
      </pane>
      <pane id="Scope" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
    <property name="settings.editor.selected.configurable" value="org.ice1000.julia.lang.module.ui.JuliaPackageManagerImpl" />
  </component>
  <component name="RunDashboard">
    <option name="ruleStates">
      <list>
        <RuleState>
          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
        </RuleState>
        <RuleState>
          <option name="name" value="StatusDashboardGroupingRule" />
        </RuleState>
      </list>
    </option>
  </component>
  <component name="RunManager" selected="Julia.Pi">
    <configuration name="Laplacian" type="JULIA_RUN_CONFIG_ID" factoryName="Julia" temporary="true">
      <setting name="workingDir" value="$PROJECT_DIR$" />
      <setting name="targetFile" value="$PROJECT_DIR$/Graph/Laplacian.jl" />
      <setting name="additionalOptions" value="" />
      <setting name="programArgs" value="" />
      <setting name="juliaExecutive" value="/Applications/Julia-1.0.app/Contents/Resources/julia/bin/julia" />
      <setting name="jitCompiler" value="yes" />
      <setting name="deprecationWarning" value="yes" />
      <setting name="codeCoverage" value="none" />
      <setting name="trackAllocation" value="none" />
      <setting name="systemImage" value="" />
      <setting name="systemImageOption" value="false" />
      <setting name="inlineOption" value="false" />
      <setting name="checkBoundsOption" value="false" />
      <setting name="colorOption" value="true" />
      <setting name="mathModeOption" value="false" />
      <setting name="handleSignalOption" value="false" />
      <setting name="startupFileOption" value="false" />
      <setting name="historyOption" value="false" />
      <setting name="launchReplOption" value="false" />
      <setting name="optimizationLevel" value="3" />
    </configuration>
    <configuration name="Pi" type="JULIA_RUN_CONFIG_ID" factoryName="Julia" temporary="true">
      <setting name="workingDir" value="$PROJECT_DIR$" />
      <setting name="targetFile" value="$PROJECT_DIR$/Pi.jl" />
      <setting name="additionalOptions" value="" />
      <setting name="programArgs" value="" />
      <setting name="juliaExecutive" value="/Applications/Julia-1.0.app/Contents/Resources/julia/bin/julia" />
      <setting name="jitCompiler" value="yes" />
      <setting name="deprecationWarning" value="yes" />
      <setting name="codeCoverage" value="none" />
      <setting name="trackAllocation" value="none" />
      <setting name="systemImage" value="" />
      <setting name="systemImageOption" value="false" />
      <setting name="inlineOption" value="false" />
      <setting name="checkBoundsOption" value="false" />
      <setting name="colorOption" value="true" />
      <setting name="mathModeOption" value="false" />
      <setting name="handleSignalOption" value="false" />
      <setting name="startupFileOption" value="false" />
      <setting name="historyOption" value="false" />
      <setting name="launchReplOption" value="false" />
      <setting name="optimizationLevel" value="3" />
    </configuration>
    <configuration name="SVD" type="JULIA_RUN_CONFIG_ID" factoryName="Julia" temporary="true">
      <setting name="workingDir" value="$PROJECT_DIR$" />
      <setting name="targetFile" value="$PROJECT_DIR$/Graph/SVD.jl" />
      <setting name="additionalOptions" value="" />
      <setting name="programArgs" value="" />
      <setting name="juliaExecutive" value="" />
      <setting name="jitCompiler" value="yes" />
      <setting name="deprecationWarning" value="yes" />
      <setting name="codeCoverage" value="none" />
      <setting name="trackAllocation" value="none" />
      <setting name="systemImage" value="" />
      <setting name="systemImageOption" value="false" />
      <setting name="inlineOption" value="false" />
      <setting name="checkBoundsOption" value="false" />
      <setting name="colorOption" value="true" />
      <setting name="mathModeOption" value="false" />
      <setting name="handleSignalOption" value="false" />
      <setting name="startupFileOption" value="false" />
      <setting name="historyOption" value="false" />
      <setting name="launchReplOption" value="false" />
      <setting name="optimizationLevel" value="3" />
    </configuration>
    <list>
      <item itemvalue="Julia.SVD" />
      <item itemvalue="Julia.Pi" />
      <item itemvalue="Julia.Laplacian" />
    </list>
    <recent_temporary>
      <list>
        <item itemvalue="Julia.Pi" />
        <item itemvalue="Julia.Laplacian" />
        <item itemvalue="Julia.SVD" />
      </list>
    </recent_temporary>
  </component>
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="1a472be0-3f8f-4a3b-97bc-07acee0fffc5" name="Default" comment="" />
      <created>1540750041678</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1540750041678</updated>
    </task>
    <servers />
  </component>
  <component name="TodoView">
    <todo-panel id="selected-file">
      <is-autoscroll-to-source value="true" />
    </todo-panel>
    <todo-panel id="all">
      <are-packages-shown value="true" />
      <is-autoscroll-to-source value="true" />
    </todo-panel>
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="0" width="2560" height="1440" extended-state="0" />
    <editor active="true" />
    <layout>
      <window_info anchor="bottom" id="TODO" order="6" weight="0.3298611" />
      <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
      <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
      <window_info anchor="bottom" id="Python Console" order="7" weight="0.3298611" />
      <window_info anchor="bottom" id="Run" order="2" weight="0.3298611" />
      <window_info id="Unicode Browser" order="2" />
      <window_info anchor="bottom" id="Terminal" order="7" />
      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.4965278" visible="true" weight="0.25" />
      <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
      <window_info anchor="right" id="Database" order="3" />
      <window_info anchor="right" id="SciView" order="3" weight="0.3296875" />
      <window_info id="Structure" order="1" sideWeight="0.50069445" side_tool="true" weight="0.25" />
      <window_info id="Favorites" order="2" sideWeight="0.5034722" side_tool="true" visible="true" weight="0.25" />
      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
      <window_info anchor="bottom" id="Message" order="0" />
      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
      <window_info anchor="bottom" id="Find" order="1" />
    </layout>
  </component>
  <component name="TypeScriptGeneratedFilesManager">
    <option name="version" value="1" />
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/Pi.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="748">
          <caret line="44" column="3" selection-start-line="44" selection-start-column="3" selection-end-line="44" selection-end-column="3" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Pi.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="578">
          <caret line="34" column="13" lean-forward="true" selection-start-line="34" selection-start-column="13" selection-end-line="34" selection-end-column="13" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Kalman01.jl" />
    <entry file="file://$PROJECT_DIR$/Pi2.jl" />
    <entry file="file://$PROJECT_DIR$/Graph/SVD.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="221">
          <caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Graph/SVD.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="119">
          <caret line="7" column="19" lean-forward="true" selection-start-line="7" selection-start-column="19" selection-end-line="7" selection-end-column="19" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Graph/SVD.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="221">
          <caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Graph/SVD.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="221">
          <caret line="13" selection-start-line="13" selection-end-line="13" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Pi.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="170">
          <caret line="10" column="2" selection-start-line="10" selection-start-column="2" selection-end-line="10" selection-end-column="2" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Graph/Laplacian.jl">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="289">
          <caret line="17" lean-forward="true" selection-start-line="17" selection-end-line="17" />
        </state>
      </provider>
    </entry>
  </component>
</project>

@ice1000
Copy link
Member

ice1000 commented Nov 10, 2018

@ludwigwinkler What about .idea/juliaConfig.xml?

@ice1000
Copy link
Member

ice1000 commented Nov 10, 2018

I didn't see anything wrong with the current workspace.xml, very weird.

@ghost
Copy link

ghost commented Nov 11, 2018

Would it help if I set the DEBUG log options, using the Help option inside IntelliJ? If so, what settings should I use?

@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

@Andy-KNDJ No. Can I see your .idea/juliaConfig.xml? The error means that it's trying to run the .app file as an application but according to OP's workspace.xml there isn't a run config which tries to run the .app file. BTW his screenshot shows that he's trying to run a Test file, but I didn't see that in the workspace.xml

@ghost
Copy link

ghost commented Nov 11, 2018

How's this:

<?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="JuliaProjectSettings">
     <option name="exePath" value="/Applications/Julia-1.0.app" />
     <option name="version" value="Unknown" />
   </component>
 </project>

Curiously, this Julia exe does not exist. I did have Julia 1.0 installed at one stage, but migrated to JulaiPro. This works fine from the command line, as demonstrated below:

/usr/local/bin/julia
MacBook-Pro:~ Andy$ ls -alrt /usr/local/bin/julia
lrwxr-xr-x  1 Andy  staff  94  7 Oct 12:12 /usr/local/bin/julia -> /Applications/JuliaPro-0.6.4.1.app/Contents/Resources/julia/Contents/Resources/julia/bin/julia
MacBook-Pro:~ Andy$ julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.4 (2018-07-09 19:09 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-apple-darwin14.5.0

julia> println("Hello world")
Hello world

julia>

From memory, I had exactly the same issue (Error=13) when I was running using Julia 1.0.

@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

<?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="JuliaProjectSettings">
     <option name="exePath" value="/Applications/Julia-1.0.app" />
     <option name="version" value="Unknown" />
   </component>
 </project>

Can you modify your settings in File | Settings | Languages & Frameworks | Julia?
You can reset the Julia exe there.

@ice1000 ice1000 added the user experience User experience label Nov 11, 2018
@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

So this is just due to incorrect configuration? Hmm, seems we need a better way to notify users about invalid Julia config.

@ghost
Copy link

ghost commented Nov 11, 2018

Hmmm the 'File | Settings | Languages & Frameworksdialog _already_ shows the Julia executable as/Applications/JuliaPro-0.6.4.1.app`. I tried using the file selection feature of the preferences dialog to select my JuliaPro installation and the juliaConfig was unchanged. Note also from my original bug report that the Julia executable in the error message is shown as the JuliaPro copy. I'm guessing that the plugin is getting that name from somewhere in the plugin config. Maybe the issue is that the exe in the plugin config does not match the exe in the julia config? I can manually edit the julia config if you think that might help?

@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

JuliaPro installation

Can you select your julia executable?

@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

By the way, when running your program, julia-intellij will use the "run configuration", which can be found here:
image

Click "edit configuration", change the julia exe for this run configuration:

@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

image

@ghost
Copy link

ghost commented Nov 11, 2018

The Run... configuration for my program shows the JuliaPro instance, which is correct. However, this differs from the exe setting in my Julia config file.

@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

The Run... configuration for my program shows the JuliaPro instance, which is correct. However, this differs from the exe setting in my Julia config file.

The process is, we find your JuliaPro instance (xxx.app), run this command:

xxx.app --some-flags yourjuliafile.jl

Do you expect this to work? Can we use JuliaPro this way? I have no experience with JuliaPro so i'm not sure.

@ghost
Copy link

ghost commented Nov 11, 2018

If you check my post here then you'll see how I have a symbolic link (named julia) that sits on my path. This points into the JuliaPro directory, to the actual julia executable - version 0.6.4.

If I work from the command line and type julia myjuliafile.jl then the fie runs just fine.

@ice1000
Copy link
Member

ice1000 commented Nov 11, 2018

Can you set your Julia executable to /usr/local/bin/julia?

@ghost
Copy link

ghost commented Nov 11, 2018

@ice1000 - how do I set that? When I click on the '...' to the right of the executable selection option, I can't seem to find the /usr directory :-(

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

You can either:

  • Paste the directory in the input box
    • image
  • Select this option
    • image

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

image

This option.

@ghost
Copy link

ghost commented Nov 12, 2018

Success :-) Setting the compiler to /usr/local/bin/julia fixed the problem for me! It would be nice if the plugin located the compiler underneath the OS X '.app' hierarchy.

It also works if I set the compiler to:

/Applications/JuliaPro-0.6.4.1.app/Contents/Resources/julia/Contents/Resources/julia/bin/julia

which is what the symbolic link at /usr/local/bin/julia is actually pointing to.

I guess the ideal in the OS X world be to allow developers to set the compiler to:

/Applications/JuliaPro-0.6.4.1.app (or /Applications/Julia-1.0.app, for example)

And then for the plugin to locate the actual julia compiler at runtime, by traversing down the '.app' director hierarchy until it found an executable file named 'julia'.

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

So you didn't understand what does "Julia executable" mean at all. I have a thought: when you choose directory, we do a check for whether it's macOS and the selected directory is a "xxx.app". If so, we find the actually exe and choose it instead.
This is a user experience issue, the plugin should guide the users.

@ghost
Copy link

ghost commented Nov 12, 2018

That's pretty much what I meant. To the OS X user, the compiler will be taken to be the '.app' (even though I know that's not the actual compiler executable). As you say, it's a user experience issue, and I'm guessing that you want to make that as easy as possible. Alternatively, and as a less-good approach, you could warn if the user selects a 'compiler' that is not an executable file or is a directory.
Either way, failing with a Permission Denied error doesn't feel right. And please don't think I'm being impolite - I think you guys are doing a great job, and you have my profound thanks!

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

Long ago, we do have a check -- run --version with the selected exe and parse it.
It's removed because Julia's breaking change :(

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

OMG this file's git blame is interesting
image

@ghost
Copy link

ghost commented Nov 12, 2018

Is the method findPathMac new code or old code? It looks pretty god to me, although I'm not familiar with Kotlin. However, I worry that it might break if JuliaPro is bien used. This matches the 'julia' test, but the julia executable is much deeper in the tree than a 'normal' julia installation.

The julia compiler under JuliaPro is at:

/Applications/JuliaPro-0.6.4.1.app/Contents/Resources/julia/Contents/Resources/julia/bin/julia

So a tree search for an executable named julia might work in both cases.

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

Is the method findPathMac new code or old code?

It has been there since v0.1 I think

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

Maybe we should have a priority: choose juliapro first, julia as an alternative

@ice1000
Copy link
Member

ice1000 commented Nov 12, 2018

@zxj5470

@ice1000 ice1000 added this to the 0.3.3 milestone Nov 12, 2018
@ghost
Copy link

ghost commented Nov 12, 2018

That's certainly an option, but I'd be inclined to look for the first match on the 'julia' string under /Applications, as at present. As I understand it, JuliaPro is just another distro of Julia. You already provide an option for users to manually select the julia compiler, so they can always explicitly select another version if they want.

@zxj5470
Copy link
Collaborator

zxj5470 commented Nov 15, 2018

New feature: just need to choose Julia-xxx.app folder in macOS. (?)

@ice1000
Copy link
Member

ice1000 commented Nov 15, 2018

@zxj5470 I'm happy with it.

@ghost
Copy link

ghost commented Nov 15, 2018

fwiw, the following code snippet returns the Julia executable, underneath a Julia .app directory:

import java.io.File
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.attribute.BasicFileAttributes
import java.util.function.BiPredicate

/**
 * Matcher that locates a potential Julia .app directory
 */
val appMatcher = BiPredicate<Path, BasicFileAttributes> { path, basicFileAttributes ->
    basicFileAttributes.isDirectory() &&
            path.toFile().name.contains("julia", true) &&
            path.toFile().name.endsWith(".app")
}

/**
 * Returns a candidate Julia compiler
 */
fun findFile(): File {
    // hack so I can test stand-alone
    val appPath: Path = File("/Applications").toPath()

    val x: File = Files.find(appPath, 1, appMatcher).map {
        it.toFile().walkBottomUp()
                .filter { it.getName() == "julia" && Files.isRegularFile(it.toPath()) && Files.isExecutable(it.toPath()) }
    }.findFirst().get().first()

    return x
}

/**
 * Test the findFile function
 */
fun main(args: Array<String>) {
    println(findFile().toString())
}

It's my first bit of Kotlin code, so don't be too critical - lol ;-)
e.g. Instead of the get, I think I should check for the null case, and (maybe) throw an exception.

@zxj5470
Copy link
Collaborator

zxj5470 commented Nov 15, 2018

Preview

qq20181115-173901-hd

There's a bug in PyCharm on account of disabled resize on New a Project.

zxj5470 added a commit that referenced this issue Nov 15, 2018
@ice1000
Copy link
Member

ice1000 commented Nov 15, 2018

@Andy-KNDJ Don't worry, @zxj5470 will impl this

@ghost
Copy link

ghost commented Nov 15, 2018

@Andy-KNDJ Don't worry, @zxj5470 will impl this

That's fine - I just wrote it for the fun of it :-)

I'm going to uninstall JuliaPro and migrate to Julia 1.0 (the latest version). tbh, I'd only gone back to the JuliaPro (0.6.4.1) release because i thought that the plugin might have issues with the latest version.

@ice1000
Copy link
Member

ice1000 commented Nov 15, 2018

What issue? Feel free to point out

@ghost
Copy link

ghost commented Nov 15, 2018

What issue? Feel free to point out

I had this issue with V1.0 (i.e. the Permission Denied) and thought it might be because I was using the latest version of Julia. Turns out this was not the problem - no need to worry!

@ice1000
Copy link
Member

ice1000 commented Nov 15, 2018

Closed as fixed.
You'll see update in 0.3.3

@ice1000 ice1000 closed this as completed Nov 15, 2018
@ghost
Copy link

ghost commented Nov 15, 2018

Brilliant!

@spockoyno
Copy link

I have a Julia "helloWorld" project in Intellij and another in PyCharm based on the same Julia 0.7 app installed on Mac OS. Works like a charm in Intellij, but unfortunately it's still an issue in PyCharm 2018.2: the same "permission denied" and "error 13". Is there a workaround for the PyCharm? (I couldn't find the option there to Select a Julia compiler there.)

PS. Huge thanks for the great plug-in -- much better than Atom, JuliaPro and IJulia that I've tried.

@ice1000
Copy link
Member

ice1000 commented Nov 19, 2018

@spockoyno It's fixed. Try the nightly build! It's on the README page.

@ice1000
Copy link
Member

ice1000 commented Nov 19, 2018

We plan to fix more bugs and release 0.3.3 soon.

@ice1000
Copy link
Member

ice1000 commented Nov 19, 2018

PS. Huge thanks for the great plug-in -- much better than Atom, JuliaPro and IJulia that I've tried.

Well, thanks very much. It's @zxj5470 creating new features recently, appreciate his work. I'm basically fixing some weird bugs randomly at the weekend. Julia's tooling is still mysterious, I still didn't find a nice way to integrate existing Julia tools since the REPL starts too slow, which drastically reduces user expr.

@spockoyno
Copy link

Thanks for doing a great job - I look forward to v. 0.3.3. My worst experience with JuliaPro + Julia 1.0 was not being able to install 50% of the packages that I needed. (Probably related to https://discourse.julialang.org/t/package-compatibility-caps/15301 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution When running Julia codes platform: macOS user experience User experience
Projects
None yet
Development

No branches or pull requests

4 participants