Skip to content

Conversation

@justin-layerv
Copy link
Contributor

@justin-layerv justin-layerv commented Jan 4, 2026

Summary

  • Add common development targets to improve developer experience
  • Replace stub test target with actual test runner
  • Add comprehensive help target documenting all available commands

New Targets

Target Description
make dev Quick development build (no version injection)
make test Run all tests with go test -v ./...
make test-race Run tests with race detection enabled
make fmt Format code with gofmt
make lint Run golangci-lint (with helpful install message if missing)
make clean Remove build artifacts
make help Show comprehensive help with all available targets

Changes

  • Fixed: The previous test target was a stub that only printed messages - now it actually runs tests
  • Fixed: Skip interactive tests with infinite loops that were causing CI timeouts
  • Added .PHONY declarations for all new targets
  • Help output is organized by category (Development, Build, SDK, Other)

Test plan

  • Verify make help shows formatted output
  • Run make test to verify tests execute
  • Run make fmt to verify code formatting
  • Run make clean to verify artifact cleanup

@justin-layerv justin-layerv self-assigned this Jan 4, 2026
@justin-layerv justin-layerv force-pushed the build/makefile-improvements branch 3 times, most recently from f24fb0b to 67055d8 Compare January 4, 2026 20:10
- log/logger.go: Fix nil file pointer when DirPath is empty but Name is set
- core/scheme/curve/curve.go: Validate private key length in SetPrivateKey
- core/scheme/gmsm/gmsm.go: Validate private key length in SetPrivateKey
- core/crypto.go: Handle empty slice in unpad function
- core/packet.go: Check for negative index in HeaderTypeToString

These fixes address panics discovered by fuzz testing and ensure graceful
error handling for malformed or edge-case inputs.
Add common development targets to improve developer experience:

- dev: Quick development build (no version injection)
- test: Run all tests with go test (replaces stub)
- test-race: Run tests with race detection
- fmt: Format code with gofmt
- lint: Run golangci-lint with helpful install message
- clean: Remove build artifacts
- help: Show comprehensive help with all available targets

The previous `test` target was a stub that only printed messages.
This change makes it actually run tests across both modules.
The wasm/policy package contains stub functions designed for WASM
compilation and cannot be built with standard Go toolchain.
Use go list with grep to filter out these packages.
These tests are meant for manual/interactive testing and contain
infinite loops that cause CI timeouts.
@justin-layerv justin-layerv force-pushed the build/makefile-improvements branch from 67055d8 to 4e461a6 Compare January 4, 2026 20:14
craftleon
craftleon previously approved these changes Jan 7, 2026
@craftleon craftleon merged commit 249d1aa into main Jan 7, 2026
7 checks passed
@craftleon craftleon deleted the build/makefile-improvements branch January 7, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants