Skip to content

Allow yaml-test load template from json to add dependencies - #3452

Merged
arnaud-lacurie merged 18 commits into
FoundationDB:mainfrom
pengpeng-lu:json
Jul 10, 2025
Merged

arnaud-lacurie merged 18 commits into
FoundationDB:mainfrom
pengpeng-lu:json

Conversation

@pengpeng-lu

@pengpeng-lu pengpeng-lu commented Jun 28, 2025 •

Copy link
Copy Markdown
Contributor

now users can put dependencies in src/test/proto, and load schema template command will automatically load these dependencies.

@pengpeng-lu pengpeng-lu added the testing improvement Change that improves our testing label Jun 30, 2025

@arnaud-lacurie arnaud-lacurie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the LOAD comment need to specify the dependency? It seems that all the information should be already present in the json, via the type name and the dependencies that you declared at the top.

@pengpeng-lu

Copy link
Copy Markdown
Contributor Author

Why does the LOAD comment need to specify the dependency? It seems that all the information should be already present in the json, via the type name and the dependencies that you declared at the top.

In the json file dependencies, it only has test_student.proto but not the file path to the proto file, so theoretically we would at least need to modify the file name to a full file path. I think it is a bit cleaner to add the compiled class name to the load schema template command than adding a somewhat random file path (it'll be something like src/test/proto/ in practice but still theoretically can be random).

record_metadata.proto and record_metadata_options.proto work because we added them in RecordMetaDataBuilder.initGeneratedDependencies, not because they are declared in the json file.

@arnaud-lacurie
arnaud-lacurie merged commit 8a15e1d into FoundationDB:main Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing improvement Change that improves our testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants