flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Fix bfbs Lua/Nim generators: honor -o and create namespace dirs

Open beingbrijesh opened this issue 1 month ago • 4 comments

"Fixes #8762 ": Use ConCatPathFileName(options_.output_path, path) and EnsureDirExists(full_dir) so generators create namespace directories under the provided -o path.

Also: added goldens/schema/namespace_first.fbs, updated Lua goldens, added tests/test_bfbs_namespace_output.py (Lua + Nim tests), and integrated the Python test into CMake.

Testing: built flatc, ran CTest; both new tests passed locally.

beingbrijesh avatar Nov 07 '25 14:11 beingbrijesh

@cosmith-nvidia @dbaileychess @aardappel can you please review my fixes for the issue #8762

beingbrijesh avatar Nov 08 '25 09:11 beingbrijesh

@beingbrijesh just a friendly note - if you update your description with "fixes #8762" it will link this PR and that issue :)

jtdavis777 avatar Nov 15 '25 17:11 jtdavis777

@beingbrijesh just a friendly note - if you update your description with "fixes #8762" it will link this PR and that issue :)

@thejtshow thank you for your feedback, I have updated the description :)

beingbrijesh avatar Nov 15 '25 17:11 beingbrijesh

This is not the way to do it, the goldens dir is for a specific purpose and we should not add new schemas there that are only generated for 2 languages.

It also generates new files (for Nim) without renaming the old ones.

Generally, if something can be tested with the existing files in tests that is better.

aardappel avatar Nov 17 '25 21:11 aardappel