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

Feature request: Not include generated files in Compile #7

Open
emphasis87 opened this issue Aug 20, 2020 · 3 comments
Open

Feature request: Not include generated files in Compile #7

emphasis87 opened this issue Aug 20, 2020 · 3 comments

Comments

@emphasis87
Copy link

I would prefer to have the generated files as a part of a git repository insted of being ephemeral.

I tried to set the output path for the .g4 file to '.' and it works perfectly, the sdk project format picks it up immediately. However, since the task adds it as compile items it produces duplicate definition errors.

Would it be possible to add an option to the Antlr4 item to not include the files in Compile list and let the project handle it?

I also removed *.interop and *.tokens files, since they are not compiled and presumably used only during code generation.

<PropertyGroup>
  <DefaultItemExcludes>$(DefaultItemExcludes);**\*.interp;**\*.tokens</DefaultItemExcludes>
</PropertyGroup>
@kaby76
Copy link
Owner

kaby76 commented Aug 20, 2020

The code is supposed to handle all this, but it's braking in your environment. Could you post the output from "dotnet build --verbosity diagnostic" here? That was the whole point of SubtractList and MakeRelativeList. It's supposed to removing duplicates and those the .tokens and .interp files from the "to do" compile list. Adding a hack option on top isn't fixing the problem here. Thanks.

@emphasis87
Copy link
Author

Ah, it seems it was some strange build cache issue. After clean and build it seems to work.
However, *.interp and *.tokens files remain. Should they have been deleted during the build?
Here is the build log: build.txt

@kaby76
Copy link
Owner

kaby76 commented Aug 20, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants