Skip to content

Version 12.13+ is broken by default on Windows systems using NVM for Windows #125

Description

@buttercat1791

I develop on a Windows machine, and I recently tried to update Antlr4BuildTasks in my project to version 12.14. Following the upgrade, attempting to build my project produced the following error:

The "NodeDownloadDirectory" parameter is not supported by the "RunAntlrTool" task loaded from assembly: Antlr4BuildTasks, Version=12.8.0.0, Culture=neutral, PublicKeyToken=null from the path: C:\Users\MJURKOIC\.nuget\packages\antlr4buildtasks\12.8.0\lib\netstandard2.0\Antlr4BuildTasks.dll. Verify that the parameter exists on the task, the <UsingTask> points to the correct assembly, and it is a settable public instance property.

The cause of the error seems clear enough to me: the default value for NodeDownloadDirectory is USERPROFILE/.node/. NVM for Windows, for its part, puts the .node directory at a unique path per installed Node version.

I've tested with different versions of Antlr4BuildTasks, and the issue appears for me starting with version 12.13. I am using the Java version of ANTLR4, not the Node.js version.

This issue means Antlr4BuildTasks fails to work out of the box on many systems. Furthermore, there is no documentation for proper setup of the Node install directory. The NodeDownloadDirectory parameter is not detailed in the README or any other documentation in the repo.

At minimum, I would wish for documentation explaining how to properly setup this parameter if Node.js is installed in a non-default location. Ideally, the library should be configured so as to not require the NodeDownloadDirectory parameter if antlr-ng is not in use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions