merge-modules pass crashed
Hi, I wanted to use elm-reduce
to create a SSCCE for a bug I found in the 0.19.1-alpha-2 compiler. After running elm-reduce
for a few minutes I got an error.
The error message was:
Failed to parse module at ".\\vendored-libs\\\\mdgriffith\\\\elm-ui\\\\1.1.0\\\\src\\Element\\Input.elm" due to the errors above.
CallStack (from HasCallStack):
error, called at src\Language\Elm.hs:223:13 in elm-reduce-1.0.0.0-A40A70JsBu6I8CyJX6eCJx:Language.Elm
Additional info:
The elm-reduce-script
which elm-reduce
calls is a C# program. Here's the source code for that
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace elm_reduce_script
{
class Program
{
static void Main(string[] args)
{
Environment.CurrentDirectory = @"C:\Users\Martin\hackman";
try
{
Directory.Delete("elm-stuff", true);
}
catch
{
}
var elmJson = "elm.json";
var text = File.ReadAllText(elmJson);
File.WriteAllText(elmJson, text.Replace("0.19.0", "0.19.1"));
Process.Start("elm-0.19.1-alpha-2-windows.exe", "make src/Main.elm");
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "elm-0.19.1-alpha-2-windows.exe";
startInfo.Arguments = "make src/Main.elm";
process.StartInfo = startInfo;
process.StartInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardError = true;
process.Start();
process.WaitForExit();
var data = process.StandardError.ReadToEnd();
var text2 = File.ReadAllText(elmJson);
File.WriteAllText(elmJson, text2.Replace("0.19.1", "0.19.0"));
if (data.Contains("thread blocked indefinitely in an MVar operation"))
{
Environment.Exit(0);
}
Environment.Exit(1);
}
}
}
elm-reduce-bug-merge-modules-0.zip elm-reduce-bug-format-0.zip elm-reduce-bug-remove-dead-modules-0.zip