FS#75720 - [flatbuffers] --keep-prefix broken with includes in separate directories

Attached to Project: Community Packages
Opened by Aaron Barany (akb825) - Sunday, 28 August 2022, 23:37 GMT
Last edited by Chih-Hsuan Yen (yan12125) - Monday, 29 August 2022, 07:57 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Antonio Rojas (arojas)
Chih-Hsuan Yen (yan12125)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When using the --keep-prefix option for flatc, the prefix isn't kept when the include file is in a separate directory that's provided with the -I option. This is a regression from 2.0.6.

Additional info:
* package version: 2.0.7
* upstream bug report: https://github.com/google/flatbuffers/issues/7486
* upstream fix: https://github.com/google/flatbuffers/commit/fef2ffc4d09ff6f9d878f7b426c57abafc0bb1ca

Steps to reproduce:
1. Create a flatbuffer file in a directory. (e.g. <somedir>/foo/bar.fbs)
2. Create another flatbuffer file in another directory (e.g. <otherdir>/baz.fbs) with the line `include "foo/bar.fbs"`
3. Build the second flatbuffer with the command: flatc --cpp --keep-prefix -I <somedir> baz.fbs
4. In the output baz_generated.h, the line #include "bar_generated.h" will be present rather than the expected #include "foo/bar_generated.h".
This task depends upon

Closed by  Chih-Hsuan Yen (yan12125)
Monday, 29 August 2022, 07:57 GMT
Reason for closing:  Fixed
Additional comments about closing:  flatbuffers 2.0.7-2
Comment by Chih-Hsuan Yen (yan12125) - Monday, 29 August 2022, 02:11 GMT
Hi, could you verify if community-testing/flatbuffers 2.0.7-2 works?
Comment by Aaron Barany (akb825) - Monday, 29 August 2022, 07:17 GMT
I can confirm the testing package fixes the issue.
Comment by Chih-Hsuan Yen (yan12125) - Monday, 29 August 2022, 07:57 GMT
Thanks! The new version is moved to [community].

Loading...