Skip to content
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

Switch codegen to source importing and allow additional imports. #753

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nomis52
Copy link

@nomis52 nomis52 commented Apr 19, 2019

Go 1.5 introduced the 'source' compiler. See
golang/go#11415 for details.

This avoids the problem of using out of date information when generating
code. It also means we don't have to have to run go install prior to
generating.

I also added the ability to specify additional imports since we use
codegen to generate files that depend on types outside testify.

@nomis52
Copy link
Author

nomis52 commented Apr 19, 2019

I can change this to use imported.ForCompiler() if you like, but that was only introduced in 1.12

@nomis52 nomis52 changed the title Switch to source importing and allow additional imports. Switch codegen to source importing and allow additional imports. Apr 19, 2019
Go 1.5 introduced the 'source' compiler. See
golang/go#11415 for details.

This avoids the problem of using out of date information when generating
code. It also means we don't have to have to run `go install` prior to
generating.

I also added the ability to specify additional imports since we use
codegen to generate files that depend on types outside testify.
@dolmen dolmen added the internal/codegen Change related to internal code generation label Jul 7, 2023
@dolmen
Copy link
Collaborator

dolmen commented Jul 7, 2023

@nomis52 This PR doesn't seem relevant anymore after rebase. Could you either confirm (and close) or explain how it is still useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input needed internal/codegen Change related to internal code generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants