-
Notifications
You must be signed in to change notification settings - Fork 16
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
A bunch of random improvements #58
base: main
Are you sure you want to change the base?
Conversation
@@ -115,12 +117,13 @@ await GetPackageDependencies( | |||
|
|||
foreach (var path in libraries) | |||
{ | |||
var assembly = Assembly.LoadFrom(path); | |||
if (context.TryAddReferenceAssembly(assembly)) | |||
var asm = Assembly.LoadFile(path); |
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.
var asm = Assembly.LoadFile(path); | |
var assembly = Assembly.LoadFile(path); |
public void ResetButton() | ||
{ | ||
System.Environment.Exit(0); | ||
} | ||
|
||
public void PowerButton() | ||
{ | ||
System.Environment.Exit(1); | ||
} |
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.
I don't think there's mileage in getting rid of this. If there are other consumers of the REPL, it's likely that they may want this API to remain for now.
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.
Are there any other users? In any case after removal of BasicEnvironment you can call the method that these wrapped anyway, but I have no strong opinion either way
public static ConsoleLikeStringWriter Console { get; internal set; } | ||
public static BasicEnvironment Environment { get; internal set; } |
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.
What is the motivation behind removing the environment facade?
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.
It's kinda just dead code? I believe it originates from where there was an idea that the repl should be "secure", and if you remove the analyzer that blacklisted the real System.Environment like I also did here, you get almost the same behavior. The one big exception is that it doesn't stop you from reading/writing environment variables anymore, but that was easily bypassed with reflection or Cmd("env");
anyway.
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.
I think these should be split into separate files at this point.
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.
I can do that, was just leaving it as I found it originally
No description provided.