Requirements for Adding, Changing, or Removing a Feature
Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
The pull request must contribute a change that has been endorsed by the maintainer team. See details in the template below.
The change use different commands for Linux.
Mainly, depending on .NET Core.
For C#, dotnet is used instead of mono.
Might want to change csc to dotnet csc when that becomes available.
For C# scripts, dotnet script is used instead of scriptcs.
Might want to change to dotnet csi when that beomes available.
For F# scripts, dotnet fsi is used instead of fsharpi
Alternate Designs
I haven't made checks which may need the lookpath Node.js package.
That is to check maybe if mono or dotnet is installed.
Possible Drawbacks
The dotnet script seems to be only in user directory.
That may mean .csx won't work outside the user environment.
Verification Process
I use certain files to test this.
C# example
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
- **C# script**
//usr/bin/env dotnet script "$0" "$@";exit $?
var fw = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription;
var arch = System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture;
Console.WriteLine($"Hello world ({fw}, {arch})");
- **F# script**
//usr/bin/env dotnet fsi "$0" "$@";exit $?
printfn "Hello world!"
### Release Notes
<!--
Please describe the changes in a single line that explains this improvement in
terms that a user can understand. This text will be used in Atom's release notes.
If this change is not user-facing or notable enough to be included in release notes
you may use the strings "Not applicable" or "N/A" here.
Examples:
- The GitHub package now allows you to add co-authors to commits.
- Fixed an issue where multiple cursors did not work in a file with a single line.
- Increased the performance of searching and replacing across a whole project.
-->
Requirements for Adding, Changing, or Removing a Feature
Issue or RFC Endorsed by Atom's Maintainers
Description of the Change
The change use different commands for Linux. Mainly, depending on .NET Core.
For C#,
dotnet
is used instead ofmono
.For C# scripts,
dotnet script
is used instead ofscriptcs
.For F# scripts,
dotnet fsi
is used instead offsharpi
Alternate Designs
I haven't made checks which may need the lookpath Node.js package. That is to check maybe if
mono
ordotnet
is installed.Possible Drawbacks
The
dotnet script
seems to be only in user directory. That may mean.csx
won't work outside the user environment.Verification Process
I use certain files to test this.
namespace HelloWorld { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } }
//usr/bin/env dotnet script "$0" "$@";exit $?
var fw = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription; var arch = System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture; Console.WriteLine($"Hello world ({fw}, {arch})");
//usr/bin/env dotnet fsi "$0" "$@";exit $?
printfn "Hello world!"