Skip to content
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

Add workaround for Rider to see the Antlr3 generated files at design time #3518

Merged
merged 5 commits into from
Apr 6, 2024

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Apr 4, 2024

Re-implemented Antlr's DesignTimeGrammarCompilationWorkaround task to be explicitly run by Rider in design time

I've submitted patch to Antlr, but doubt that it'll be accepted.

@fredericDelaporte fredericDelaporte added this to the 5.6 milestone Apr 5, 2024
@fredericDelaporte
Copy link
Member

fredericDelaporte commented Apr 5, 2024

Can no more compile under VS:

Build started at 07:00...
1>------ Build started: Project: NHibernate, Configuration: Debug Any CPU ------
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(61,11): error MSB4057: The target "DesignTimeGrammarCompilation" does not exist in the project.
1>Done building project "NHibernate.csproj" -- FAILED.
2>------ Build started: Project: NHibernate.DomainModel, Configuration: Debug Any CPU ------
3>------ Build started: Project: NHibernate.Test, Configuration: Debug Any CPU ------
4>------ Build started: Project: NHibernate.Test.VisualBasic, Configuration: Debug Any CPU ------
5>------ Build started: Project: NHibernate.TestDatabaseSetup, Configuration: Debug Any CPU ------
========== Build: 0 succeeded, 5 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 07:00 and took 35,886 seconds ==========

(After bin/obj and .vs purge, VS reload. Does compile again if switched back to master.)

@hazzik

This comment was marked as resolved.

@hazzik
Copy link
Member Author

hazzik commented Apr 5, 2024

@fredericDelaporte it seems now it works reliable in both VS and Rider. Could you please check?

@hazzik hazzik merged commit f3afcf9 into nhibernate:master Apr 6, 2024
22 checks passed
@hazzik hazzik deleted the antlr-rider-workaround branch April 6, 2024 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants