-
Notifications
You must be signed in to change notification settings - Fork 7
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
RFC: project initialization, module creation, and the Git Root #1775
Comments
Nice! Thanks @safeer Maybe we should consider having ftl module new go . mymodule It's a bit more verbose, but could leave room for future commands. |
I agree the new requirement doesn't work well in some cases, but I think we can still keep just The rationale is that if a file is manually created we want to use it, but we also want to pick a default location when possible. Have a look at #1784, the semantics are the following:
Basically under all circumstances, a config file path will be returned. I think this makes sense, and will give a decent user experience WDWT? |
OTOH maybe it is preferable to have separate "init" and use phases, akin to "git init ." and "git add foo". How about this to create the
And just:
To create a new module in the given directory. eg.
|
Actually this will be nice too, because we can expose all of the undocumented config entries like I think this is a good idea. |
I don't think it should create a git repo, but what Hermit does is that if a git repo exists, it will add the newly created files to git automatically, unless |
I'm digging it.
So in a world with a separate
I dig this too. Supporting FTL outside of a git hierarchy would also mean making |
One thing I've noticed that the scaffolding, specifically for Hermit's This won't really work when supporting different languages in the same project. So adding a new module would be Just would be nice to keep that |
I'm thinking that there should be some scaffolding during Then when And This way the hermit flag is only specified at |
Yeah that sounds reasonable to me. We could also add |
Definitely. I think we just search ancestor directories to find the config, and if not found we error.
Use of git should be conditional currently, and should remain so yeah. |
The current process to create an FTL project follows. The result is an
ftl-project.toml
file and a modulemymodule
.FTL currently makes an assumption that a project is in a Git repository, so commands such as
ftl init
will fail ifgit init
is not run first. This made sense when theftl-project.toml
file wasn't required, since the root of the project was assumed to be the Git root, but when a singleftl-project.toml
file is required, does this still make sense?Up until recently,
ftl init
only created a module, sinceftl-project.toml
was not required. It now creates aftl-project.toml
file in addition to a modulemymodule
. Does it still make sense to overload theinit
command?Proposal: separate out
ftl init
from a new command, something likeftl module
.Here,
ftl init
would create aftl-project.toml
file, and maybe create a git repository if one doesn't exist?.gitignore
etc as we do nowftl-project.toml
Does this seem cleaner?
The text was updated successfully, but these errors were encountered: