cs-script icon indicating copy to clipboard operation
cs-script copied to clipboard

Precompiler functionality broken

Open rconde01 opened this issue 10 months ago • 4 comments

Using 4.8.12.0 test.cs

//css_precompiler Precompiler.cs;

using System;

class Program {
    static void Main(){
        System.Console.WriteLine("Hello");
    }
}

Precompiler.cs

public class Precompiler
{
    public static bool Compile(ref string code, string scriptFile, bool isPrimaryScript, Hashtable context)
    { 
        return false; //false as the code has not been modified
    }
}

running:

cscs test.cs

gives:

Error: Specified file could not be compiled.

Cannot load precompiler D:\third_party_bug_reports\cs-script\precompiler_broken\Precompiler.cs: Object reference not set to an instance of an object.

rconde01 avatar Apr 11 '24 01:04 rconde01

Txs for reporting. Will have a look.

oleg-shilo avatar Apr 11 '24 05:04 oleg-shilo

Found it. A silly mistake. Easy to fix. The fix update will be ready in a day or two.

oleg-shilo avatar Apr 11 '24 08:04 oleg-shilo

Done. The fix is merged (684516c).

Will do the release asap

oleg-shilo avatar Apr 11 '24 11:04 oleg-shilo

Released: https://github.com/oleg-shilo/cs-script/releases/tag/v4.8.15

You can update your installation via dotnet tool: dotnet tool install --global cs-script.cli --version 4.8.15

Publishing on Chocolatey and WinGet will take a little longer (a day or two)

oleg-shilo avatar Apr 11 '24 13:04 oleg-shilo