-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cannot execute when creating multiple odin scratch files #142
Comments
Hi there. It's not a plugin error. You need to put the Odin files in different directories otherwise you get that compile error |
Certainly, this is the correct behavior for Odin, but it is incompatible with the scratch feature provided by the IntelliJ IDE platform. https://www.jetbrains.com/help/idea/scratches.html#use-dependency-in-scratch-file It would be ideal if scratch's main could be executed independently, as in Goland. Thanks for developing such a useful plugin. |
Oh maybe there's an easy way to achieve that. "odin run" also supports "-f" which will ignore any other file other than the one passed to it. (see odin run --help) So a possible way to implement it is to
Yeah, I think that's the proper way to do it. I'm re-opening the issue. Expect this to be implemented one or two releases down the way. Also, if you want to help testing, feel free to join the Odin discord server. There I will also share pre-releases. |
Also add "Build as file" checkbox in run configuration. This allows to run the main methods of multiple scratch files, without the compiler complaining about re-declared main procedure.
This features has been implemented with c3bd98c. Needs to be tested. Feel free to join the Odin discord server to access the pre-release |
Plugin Version: 0.13.0
Odin version: dev-2025-02
IDE: CLion 2024.3.3
OS: macOS 15.3.1(24D70)
When I created multiple odin files using the IDE's scratch file function, I was unable to execute them due to the following error.
In the scratch file environment, I think that it is necessary to execute files on a file-by-file basis using the -file option.
The text was updated successfully, but these errors were encountered: