You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request refactors and improves the testing plugin’s example management and build process, updates generated code to reflect newer tool versions, and introduces better linting and exclusion practices. The changes make it easier to generate, build, and test example services, and ensure that generated files and linting processes are up-to-date and accurate.
Build and Example Management Improvements:
Major refactor of testing/Makefile to add explicit gen, example, test, build-examples, and clean targets for generating, building, and testing example services (calculator, httpgrpc, jsonrpc). This replaces the old, less flexible approach and provides clearer, more maintainable commands.
Addition of a .golint_exclude file to exclude the examples directory from linting, preventing unnecessary lint errors on example code.
Linting and Formatting Enhancements:
The lint target in plugins.mk is updated to exclude .pb.go files (protobuf-generated code) from formatting checks, avoiding false positives and unnecessary formatting errors.
Generated Code Updates:
All generated files in testing/examples/calculator/gen and related subdirectories now show updated headers, reflecting the latest version of goa and the new command-line arguments used for code generation. [1][2][3][4][5][6][7][8][9][10][11][12][13]
The goa.json file is added to record the goa version used for code generation, supporting better reproducibility.
Minor Documentation and Code Quality:
Minor improvements to comments and docstrings for clarity and formatting in test harness code.
Minor improvements to error name documentation for generated error types.
These changes collectively improve the maintainability, reliability, and developer experience when working with the testing plugin and its example services.
Thanks for cleaning this up, the new targets make the testing plugin examples much easier to work with.
I pulled the PR locally and ran the new paths from a clean archive of the branch:
make -C testing test
make -C testing lint
make -C testing build-examples
make -C testing all
Everything passed.
The main thing I noticed is that top-level CI still does not exercise this, since testing is not in the root PLUGINS list. That means make ci can stay green even if testing/Makefile regresses. Could you either add testing to PLUGINS or add a dedicated CI step for make -C testing all?
Tiny cleanup: because testing/Makefile includes ../plugins.mk before redefining test, make prints an override warning on every target. It does not break anything, but it would be nice to avoid the noise while touching this.
I added testing to PLUGINS. Everything passed, so it's ready to merge.
The override warning isn't limited to testing, so it would be better to fix it in a separate pull request. It seems like it could be resolved by using the double colon rule (::).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and improves the
testingplugin’s example management and build process, updates generated code to reflect newer tool versions, and introduces better linting and exclusion practices. The changes make it easier to generate, build, and test example services, and ensure that generated files and linting processes are up-to-date and accurate.Build and Example Management Improvements:
testing/Makefileto add explicitgen,example,test,build-examples, andcleantargets for generating, building, and testing example services (calculator,httpgrpc,jsonrpc). This replaces the old, less flexible approach and provides clearer, more maintainable commands..golint_excludefile to exclude theexamplesdirectory from linting, preventing unnecessary lint errors on example code.Linting and Formatting Enhancements:
linttarget inplugins.mkis updated to exclude.pb.gofiles (protobuf-generated code) from formatting checks, avoiding false positives and unnecessary formatting errors.Generated Code Updates:
testing/examples/calculator/genand related subdirectories now show updated headers, reflecting the latest version ofgoaand the new command-line arguments used for code generation. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]goa.jsonfile is added to record thegoaversion used for code generation, supporting better reproducibility.Minor Documentation and Code Quality:
These changes collectively improve the maintainability, reliability, and developer experience when working with the
testingplugin and its example services.