Skip to content

Fix import issue for non-main packages#100

Open
pistatium wants to merge 1 commit into
masaushi:mainfrom
pistatium:fix/external_package
Open

Fix import issue for non-main packages#100
pistatium wants to merge 1 commit into
masaushi:mainfrom
pistatium:fix/external_package

Conversation

@pistatium

Copy link
Copy Markdown

Description:
This PR addresses the issue where the generated code for non-main packages does not correctly import the required time package, leading to a build failure. Additionally, a test case using the time package has been added to ensure proper generation and functionality.

Changes:
• Fixed import handling for non-main packages in the generated code.
• Added a test case that utilizes the time package to verify correct behavior.

Related Issue:
Fixes #95

Please review the changes, and let me know if any modifications are needed.
Thank you for your time!

@masaushi

Copy link
Copy Markdown
Owner

Thank you for your contribution! Your changes look good, but you probably don’t need to add a new test case since there’s already a test that checks the import of the time package:

field1 time.Time `accessor:"getter,setter"`

Once again, I appreciate your effort in fixing this issue. Thank you!

@pistatium

Copy link
Copy Markdown
Author

Thank you for your review and for pointing that out.

I overlooked the existing test case. It indeed appears to be working correctly, and I was unable to write a test case that reliably reproduces the issue on my end.

Since I cannot be entirely sure that my changes fully resolve the problem, I will take some time to investigate further.

I appreciate your patience and guidance!

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.

Bug in Code Generation for Non-Main Packages

2 participants