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

fix: ftl new uses project root as dir #3412

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

matt2e
Copy link
Collaborator

@matt2e matt2e commented Nov 18, 2024

fixes #3012

@matt2e matt2e requested a review from alecthomas as a code owner November 18, 2024 00:26
@ftl-robot ftl-robot mentioned this pull request Nov 18, 2024
@alecthomas
Copy link
Collaborator

This doesn't seem like the right solution to either of these issues to me?

For the first, ftl commands that rely on a project should immediately error with a useful message if they're used outside of a project.

For the latter...that sounds like a bug that should be fixed, not worked around?

@matt2e matt2e force-pushed the matt2e/module-no-project branch from b6c13cb to 04df36e Compare November 18, 2024 03:35
@matt2e matt2e requested a review from a team as a code owner November 18, 2024 03:35
@matt2e matt2e requested review from wesbillman and removed request for a team November 18, 2024 03:35
@matt2e matt2e changed the title fix: language plugins opt out of a working dir & .pid file fix: ftl new uses project root as dir Nov 18, 2024
@matt2e matt2e force-pushed the matt2e/module-no-project branch from 04df36e to 91c6756 Compare November 18, 2024 03:39
@matt2e
Copy link
Collaborator Author

matt2e commented Nov 18, 2024

Had another go, this time the fix is that ftl new uses the project root as it's plugin dir. This means we don't create and leave around an extra folder when we run ftl new or ftl new --help as we can assume {root}/.ftl exists or will exist anyway

The error message should also explain to the user what they need to do to make it work as well (ftl init)

@matt2e matt2e merged commit eb58f67 into main Nov 19, 2024
92 checks passed
@matt2e matt2e deleted the matt2e/module-no-project branch November 19, 2024 22:42
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.

Panic creating a module outside of an FTL project
2 participants