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

chore: globally replace ftl in go.mod #1227

Merged
merged 1 commit into from
Apr 10, 2024
Merged

Conversation

alecthomas
Copy link
Collaborator

@alecthomas alecthomas commented Apr 10, 2024

Whenever we do ftl init go ... in a test, by default the new module will be configured to pull the FTL source from GitHub. This is both slow and incorrect. This PR changes that to always use the local FTL.

This has confused me many times.

@TBD54566975/ftl-team heads up that once this lands, any time you run ftl init go you will get a fully-qualified replacement path that won't work in CI. This is fine for tests generated on the fly, but not so good for code that is checked in - we'll need to ensure that we manually fix the path.

eg. it will look like this:

replace github.com/TBD54566975/ftl => /Users/aat/dev/ftl

Whereas in order to work across machines it will need to be relative, eg.

replace github.com/TBD54566975/ftl => ../../

Whenever we do `ftl init go ...` in a test, by default this will be
configured to pull the FTL source from GitHub. This PR changes that to
always use the local FTL, which is much more correct.

This has confused me many times.
@alecthomas alecthomas mentioned this pull request Apr 10, 2024
@alecthomas alecthomas merged commit 653ac23 into main Apr 10, 2024
13 checks passed
@alecthomas alecthomas deleted the aat/global-go-mod-replace branch April 10, 2024 20:57
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.

1 participant