-
Notifications
You must be signed in to change notification settings - Fork 11
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
Drop submodule support #174
Comments
There is support for that in |
Awesome! I'm still considering the best way to support submodules, bub knowing that
|
My feeling is that submodule handling should be an integrated part of These do have Maybe that submodule-ignoring behaviour, by default, would also be in the interest of |
I think you've touched on something important here (and also read my mind a bit 😆). When analyzing a revision, I think gengo shouldn't analyze submodules because the usage can be obscure and confusing. However, if gengo analyzed the files on disk, it should treat a submodule just like any other directory and analyze it. It's not necessarily obvious that the submodules must be initialized ( So my idea is that submodule support should be wrapped up with work tree support. In fact, it would be confusing if submodules weren't supported when reading files from the disk. 😆 It's one of those scenarios where it will be harder to not do it than to do it. This does raise thoughts and concerns that should probably go in an "Add support for analyzing worktrees" issue. But to document them while they're on my mind
|
Renaming issue to be more of an action, and closing as this action is completed. |
As I am not sure if it came across, let me state my primary concern: If The conclusions presented sound a lot like ignoring
If |
First, keep in mind that any overrides should be the exception, not the rule. GitHub has about 40k I get that it might be confusing if the git implementation uses git attributes, while a generic implementation doesn't. However, I believe a generic implementation should be fully generic, not a "maybe-git" implementation. If the generic implementation reads gitattributes, then I believe this can lead to some awkwardness because we're then left with these choices:
Also, IMO setting overrides in let file_source = Directory::new(".").with_overrides(overrides);
let gengo = Builder::new(file_source);
do_stuff_with(gengo.analyze()); Now onefetch is free to set overrides as it sees fit, whether it's from CLI options, a Besides a fully generic implementation, I have been toying with the idea of a hybrid file source. The hybrid would be git-specific, use As far as CLI usage goes, automatically detecting if an arg is a revspec or a directory is certainly a fun idea. However, I think there's a lot of risk for ambiguity. I often use branch names like
Right now, at least, I don't really want to guess the user's intent, and would rather require explicitness. I also feel like subcommands are a great way to group CLI options that are only valid for specific usage. So, just to summarize, here are my opinions:
|
I love these queries, thanks for bringing data to the discussion, it definitely helps. Following that line of argumentation, then
As a technical note, placing bare But reading all of the above makes me think you don't actually want
I liked the previous idea of leaving submodule handling to the caller entirely. That way they can decide how to deal with
I absolutely understand. Please note that all my comments aren't attempts to apply direction, but merely share my perspective, being well aware that everything comes with tradeoffs. As a user, I like
I think its about making the decision if |
Alright, thanks for the feedback!
I hadn't thought too much about this, but this makes me think that something like |
That sounds very feasible, and seems like a good way forward. Alternative implementations create facts which in turn make it easy to see which abstractions make sense to have more unification among them. Over all of this, I'd love it if it was clear what |
Submodule support TBH was kind of rushed in without proper discussion or planning, being an unrelated change wrapped up in a PR to improve performance.
Right now submodule support is not great IMO.
Vendored
, but sits in the main implementation as its own boolean valueis_submodule
.For these reasons, I think that submodules should be skipped. I'd rather drop submodule support completely and potentially add it back in with proper support, than try and patch in proper support to the current implementation.
If a user is determined to analyze submodules it's fairly easy to do without support.
Gengo::analyze
on it.git submodule foreach
).The text was updated successfully, but these errors were encountered: