-
Notifications
You must be signed in to change notification settings - Fork 6
Making the mono module no-op unless the mono runtime is present #2
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
Conversation
@@ -3,13 +3,16 @@ | |||
|
|||
namespace ScriptCs.Engine.Mono | |||
{ | |||
[Module("mono", Extensions = "csx")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly for my education, but why do we no longer need to set the extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want the REPL to just work so it needs to load the module all the time as there is no extension it can look for. We don't want people to have to specify the mono module, it should just work.
One thing you did make me realize (thanks) however is that the module should only register an engine IF one was not already registered.
I've added an conditional check for this module and the new Roslyn Module that will only register IF no other engine has already been provided. This way the F# module etc will still work and not be overridden. Order also doesn't matter, because let's say the F# module loads first, then it will register itself and not be overridden. If the Roslyn/Mono module is registered first then it will be overridden.
Make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, makes sense.
Oh, I was going to merge this but I don't have the right permissions in the scriptcs-contrib org. |
Contrib projects are up to the owner (@filipw in this case) of each project to add who they want. |
I agree with the idea (after all, we discussed it) - but what if I want to run the It feels like it would make sense to push the args to the modules so that there can be some switch or something like that. |
It should work. If you run with the mono runtime it will use the mono On Mon, Apr 21, 2014 at 11:26 PM, Filip W [email protected] wrote:
|
So on Windows, I run with the mono runtime to get the mono engine, if I run On Mon, Apr 21, 2014 at 11:27 PM, Glenn Block [email protected] wrote:
|
Sorry I mean if I run with the standard .NET runtime by just running On Mon, Apr 21, 2014 at 11:28 PM, Glenn Block [email protected] wrote:
|
See this screenshot from here (http://mono-project.com/Using_Mono_on_Windows) [image: Inline image 1] If you run scriptcs.exe using mono i.e. mono scriptcs.exe then the mono On Mon, Apr 21, 2014 at 11:29 PM, Glenn Block [email protected] wrote:
|
Making the mono module no-op unless the mono runtime is present
Fix for #1
Requires: scriptcs/scriptcs#635 to be merged first.