-
Notifications
You must be signed in to change notification settings - Fork 0
Sync #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Sync #4
Conversation
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
Signed-off-by: Mori <[email protected]>
This pull request makes two main types of improvements: it refactors the logging in the pipeline CLI to use a centralized logger, and it updates the Makefile to use a new manifest location and adjust binary output paths. The logger refactor ensures consistent, structured logging and better error reporting throughout the pipeline commands, while the Makefile changes align the build process with a new project structure and output conventions. **Logging and CLI improvements:** * Replaces all direct `fmt` and previous logger (`l.Info`) calls in `cmd/cli/pipeline.go` with the new centralized logger `gl.Log`, providing consistent log levels (info/error) and improving error visibility throughout all pipeline stages. [[1]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L17-R19) [[2]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L195-R203) [[3]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L219-R260) [[4]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L262-R312) [[5]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L309-R334) [[6]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L332-R388) [[7]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88R399-R403) [[8]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L411-R430) [[9]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L425-R450) [[10]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L445-R470) [[11]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L467-R492) [[12]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L486-R513) [[13]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L540-R560) [[14]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L560-R584) [[15]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L573-R593) [[16]](diffhunk://#diff-31683e2fa776cdb0c60eeda4f9f0709785a2499f8557a9da3b1836dc187b0c88L611-R680) **Makefile and build process updates:** * Changes the manifest file path in the Makefile from `info/manifest.json` to `internal/module/info/manifest.json` for all metadata extraction (app name, organization, repository, description, binary name). [[1]](diffhunk://#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L8-R14) [[2]](diffhunk://#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L22-R24) [[3]](diffhunk://#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L32-R42) * Updates the binary output directory from `bin/` to `dist/` in the Makefile, reflecting a new convention for build artifacts. * Removes documentation build and serve targets from the Makefile, streamlining available commands. * Cleans up the `clean` target by removing a specific docs artifact (`kbxctl-docs`).
Signed-off-by: Rafael Mori <[email protected]>
- Updated `NewConfigWithArgs` to set default directory based on executable path. - Introduced `CheckConstant` function to verify AST nodes as specific constants. - Added `InferExprType` to infer expression types in the AST. - Implemented `CheckVariable` to check for variable existence and type in context. - Enhanced `StringObfuscatePass` to obfuscate string literals and constants. - Updated `ContextAnalyzer` to refine function complexity checks and dependency analysis. - Modified `OutputManager` to skip standard library packages during import rewriting. - Added new boolean conversion tests and enhanced main application logic. - Updated Go module version to 1.25 and created a new test project for validation. Signed-off-by: Rafael Mori <[email protected]>
…ódigo Signed-off-by: Rafael Mori <[email protected]>
This pull request introduces several important improvements to project infrastructure, documentation, and workflow automation. It adds standardized issue and pull request templates, a detailed code of conduct, guidelines for Go development, and automation for dependency updates. The Makefile has been significantly refactored to enhance flexibility, maintainability, and integration with project metadata. **Project workflow and automation:** - Added standardized GitHub issue templates for bug reports and feature requests to improve the quality and consistency of user feedback. [[1]](diffhunk://#diff-185833cb26d7ac66a4d39042fd576a820c2c2c6d05ad18973bb9c7dce77267c5R1-R38) [[2]](diffhunk://#diff-148870715557a13127284f8aeaa28002ed6b034268af13c5d030ab59fd078220R1-R20) - Introduced a pull request template to ensure contributors follow best practices and provide necessary information for reviewers. - Added Dependabot configuration for automated weekly updates of Go module dependencies. **Documentation and standards:** - Added a Contributor Covenant code of conduct to set clear expectations for community behavior and enforcement. - Added a Golang craftsmanship standards document with guidelines for project structure, testing, naming, documentation, and best practices. (.github/copilot-instructions.md) - Improved the NOTICE file formatting for clarity and consistency. **Build and configuration:** - Major refactor of the `Makefile` to dynamically read project metadata from `info/manifest.json`, improve logging, centralize build/install/test logic via a support script, and enhance help documentation. - Added `.hintrc` configuration file to extend development settings.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 introduces significant improvements and refinements to the
gastypeproject, focusing on clarifying project documentation, enhancing configuration handling, and expanding the code transformation context for better optimization and maintainability. The most important changes are grouped below by theme.Documentation and Branding Updates:
README.mdto better describegastypeas a Go AST-based transpilation and code analysis tool, with clearer feature lists, updated usage instructions, and improved organization. The branding has shifted from "Revolutionary Transpiler" to simply "Transpiler" throughout the documentation.Configuration and Dependency Handling:
Config.Load(): if no directory is specified, it now uses the executable's directory as the default, ensuring more robust and predictable behavior. [1] [2]github.com/rafa-mori/grompt) fromgo.modfor a cleaner dependency tree.Transpilation Context and Struct Transformation Enhancements:
StructInfoandTranspileContextto track and retrieve default values for struct boolean fields, enabling more precise and context-aware code transformations. AddedDefaultValuestoStructInfo, and new methods for accessing struct info and default values inTranspileContext. [1] [2] [3]AddStructmethod inTranspileContextto accept and store default values for struct fields, supporting more advanced transpilation passes.AST Utilities and Type Checking:
CheckConstantutility function inastutil/strings.goto determine if an AST node is a constant of a specific type, improving the accuracy of type analysis during code transformation.astutil/types.gofor AST and token handling, preparing for future enhancements.These changes collectively improve the usability, reliability, and extensibility of the
gastypetool, making it easier for developers to optimize and secure their Go codebases.