-
Notifications
You must be signed in to change notification settings - Fork 10
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
Mark submodules as vendored by default #164
Conversation
@Byron FYI |
b28fe29
to
924737b
Compare
Yuck, I actually don't like this 😆 It really makes |
Codecov Report
@@ Coverage Diff @@
## main #164 +/- ##
==========================================
+ Coverage 82.33% 82.36% +0.03%
==========================================
Files 14 14
Lines 566 567 +1
==========================================
+ Hits 466 467 +1
Misses 100 100
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@Byron We discussed it a bit (#157 (comment)), but could you explain how attributes would get resolved for files in submodules again? Running on my dotfiles repo (non-bare clone, after running |
That's great, because it's working as expected right now. The comment meant that if you wanted superproject attributes to affect submodule paths, you could make it happen. All that needs to be done is to query attributes on the complete path using the superproject's repo, instead of the submodule-relative path in the submodule-repo. However, I don't think how useful that would really be. |
Oh, OK, got it, that makes sense. Sorry, misinterpreted the comment and thought that it was already builtin. You make a good point about having an "escape hatch," but submodules are a special case and I don't think We can discuss what this "escape hatch" could be. I think the best way would be to see how Onefetch could use this escape hatch. Just some ideas off the top of my head:
Edit: I'm leaning towards |
I think my explanation makes it sounds more complicated as it has to be. What I meant with 'using .gitattributes So if the intention is to vendor all information in a submodule, I really think there should be a fast-path that sums everything up using |
🤔 I'll have to look into that, but if by "decoding" you mean getting the file contents, we still will need to do that -- the first line is needed to check shebangs, and more for potential heuristic checks. Even if the files are vendored, gengo tries to detect their language. |
Ah, then please ignore the comment. No fast-path possible :D. I definitely wasn't aware it counts vendored code in addition. Something I don't understand though is how this works at all:
The above is the Rust repo, it has a lot of submodules and by the looks of it, For comparison, this is how it looked like when submodules where just counted as part of the codebase:
|
Using Edit: typo 🤦 Excuse me if I don't make the most sense today 😆 |
That works, thanks for the hint! And I am definitely looking forward to it not actually processing submodules unless |
Resolves #163