Navigation Menu

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 schema include name for keep-prefix #7469

Merged
merged 1 commit into from Aug 24, 2022

Conversation

dbaileychess
Copy link
Collaborator

This has been more complicated than I like. There was a subtle difference between what was stored in the parser included_files and the files_included_per_file. The former stored the schema-defined name of the include, while the later stored the relative file path. In most cases, this was the same and things worked OK, but there were cases when flatc is invoked with include paths (-I ... ) which caused the relative file path to include more prefix than expected. My fix in #7456 fixed some of those, but made an exception for files in super directories, which wasn't always right.

So all of that lead me to examine this code in depth and more clearly detail what each piece is. Instead of storing a string to represented included files, I store a struct with clearly labelled fields. Hopefully this will reduce the confusion going forward.

@github-actions github-actions bot added c++ codegen Involving generating code from schema labels Aug 24, 2022
@dbaileychess dbaileychess merged commit fef2ffc into google:master Aug 24, 2022
sssooonnnggg pushed a commit to sssooonnnggg/flatbuffers that referenced this pull request Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant