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

Use relative paths for the grammar input files #30

Merged
merged 4 commits into from
Sep 28, 2024

Conversation

albertocavalcante
Copy link
Owner

marcohu#12
marcohu#15 (comment)

The file paths that are passed to ANTLR end up in the generated output so using absolute paths breaks caching.

This PR makes it so that the relative paths to the grammar files that we get from Bazel are passed straight through to ANTLR.

To keep ANTLR from trying to recreate the directory structure containing the grammar files within the output directory I had to add -Xexact-output-dir for ANTLR4 and -fo for ANTLR3. ANTLR2 doesn't seem to have an equivalent flag and doesn't seem to have the same behavior for relative grammar file input paths.

Fixes #12.

rrbutani and others added 3 commits May 13, 2021 20:36
The file paths that are passed to antlr end up in the generated output
so using absolute paths breaks caching.

Fixes #12.
merge branch 'master' of https://github.com/rrbutani/rules_antlr into rrbutani-master
@albertocavalcante albertocavalcante merged commit f5dc55c into main Sep 28, 2024
1 check passed
@albertocavalcante albertocavalcante deleted the fix-merge-conflict-rrbutani-master branch September 28, 2024 18:39
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

Successfully merging this pull request may close these issues.

2 participants