Cargo Tester: Pre-made File Loader Refactoring #4
Labels
C-proposal
An open suggestion for a feature or improvement to include in ongoing effort
help wanted
Extra attention is needed
Proposal
The Tester cargo is intended to make testing easier & standardized. The feature in question is the loading of pre-made P4 files. Current implementation is a built in-house with
fs::read_to_string
and loads files dynamically from a resource folder based on a file name or array index. The proposed change is to swap to resource_str macro.Pros
Cons
Other
There is a lack of standard for line endings in LSP 1.7 and Wasm which has created a platform-specific discrepancies between files for whether to use CRLF or LF. Because of this, I believe the testing process should support both to iron out parser bugs!
In the future I would also like to add an extra confirmation stage to the CI/CD that given the same files P4 analyzer can spot compiler errors the same as P4 compiler. This issues shouldn't affect the prospect of this but something to be mindful of.
The text was updated successfully, but these errors were encountered: