-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
tools,build: .gitignore tweaks #17380
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handful of questions that I think repeat throughout the document
I'll dig through again after getting answers to the first bit
!test/fixtures/**/.* | ||
!tools/eslint/**/.* | ||
!tools/doc/node_modules/**/.* | ||
!deps/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this would trump #17363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check. exclusion rules seem to be tricky (CSS style), but I think these are stronger:
Lines 111 to 120 in a84f58d
# npm stuff | |
node_modules | |
package-lock.json | |
!/deps/npm/node_modules** | |
/deps/npm/node_modules/node-gyp/gyp/**/*.pyc | |
!/tools/eslint/node_modules** | |
!/tools/doc/node_modules** | |
!/test/fixtures/** | |
# not needed and causes issues for distro packagers | |
/deps/npm/node_modules/.bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it at the very least be at the bottom to avoid other rules combatting it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I saw while testing is that most of the rules below apply for /deps
(only conflict is debug/release), so IMO it makes sense to keep it up here.
@@ -24,9 +22,8 @@ perf.data.old | |||
tags | |||
.lock-wscript | |||
*.pyc | |||
doc/api.xml | |||
/doc/api.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean why was this not an absolute path? This PR makes it one right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made all relative paths absolute, since we have all sorts of path patterns deeper in the tree.
.gitignore
Outdated
!/deps/v8/src/base/debug | ||
!/deps/v8/src/debug | ||
/deps/v8/src/debug/obj | ||
deps/v8/src/inspector/Debug/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are whitelisting all of deps/ above do we need to do this here?
Also should we be ignoring anything in the deps tree at all? this seems odd to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because the debug/
pattern re-ignores all paths that have it in anywhere in the path. So we need to do a checkerboard.
- ignore `/debug/
- exclude the 3 listed dirs explicitly
- but ignore build artifacts within them
Probably should try to upstream renaming those directories from debug
to something like debugSrc
RE: the last one I'll double check.
Should we simply move |
@@ -24,9 +22,8 @@ perf.data.old | |||
tags | |||
.lock-wscript | |||
*.pyc | |||
doc/api.xml | |||
/doc/api.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean why was this not an absolute path? This PR makes it one right?
General comments:
|
@refack could we explicitly whitelist deps here and put a .gitignore in the deps folder to ignore the specific build artifacts? That seems a bit cleaner and less error prone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I agree with how we are currently white listing the deps folder. I'd like to see a response to my earlier comment about whitelisting all of deps and introducing a new .gitignore in the deps/ directory
It's the classical single-point-of-change vs. modularity issue... AFAICT most of the noise in this file is due to |
I think a special case for the deps folder including a comment in the top
level gitignore stating to look in the folder for the specific rules is a
reasonable approach
I look forward to seeing what you come up with
…On Nov 30, 2017 9:52 AM, "Refael Ackermann" ***@***.***> wrote:
could we explicitly whitelist deps here and put a .gitignore in the deps
folder to ignore the specific build artifacts? That seems a bit cleaner and
less error prone
It's the classical single-point-of-change vs. modularity issue...
My main concern is that git still lacks good exclusion traceability, i.e.
it's not easy to correlate an actual exclusion with a .gitignore rule. So
tracking them down in multiple files will increase that challenge.
AFAICT most of the noise in this file is due to debug/release directories
created during build, I'll try to figure out a better strategy to handle
those. That might simplify this file extensively.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#17380 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAecV4j9dGKNQdH_n-C_p-THmbJyiHQGks5s7fxagaJpZM4QuNUb>
.
|
Since solving the debug release issue might take a while, i've refactored the deps patterns into |
Thanks @refack
Feel free to dismiss review as I'm not at my computer
…On Nov 30, 2017 10:24 AM, "Refael Ackermann" ***@***.***> wrote:
Since solving the debug release issue might take a while, i've refactored
the deps patterns into /deps/.gitignore, so we can have something in the
meanwhile.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#17380 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAecV12Q5CN9C01WV7KdnLK2Sge4zGxpks5s7gO8gaJpZM4QuNUb>
.
|
/openssl/openssl.targets | ||
/openssl/openssl.xml | ||
|
||
!/npm/node_modules** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be !/npm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other files in /deps/npm
aren't ignores by any other rule, only node_modules
is. So this is the minimal glob needed.
!test/fixtures/**/.* | ||
!tools/eslint/**/.* | ||
!tools/doc/node_modules/**/.* | ||
!deps/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it at the very least be at the bottom to avoid other rules combatting it?
Not longer needs to block, not ready to sign off just yet
FWIW I'd rather we have a single file. Yes it might look complex, but you don't have to worry about how rules in different files affect each other. |
Just hit an edge case on my machine I gitignore global |
According to the git manual our BTW: I've found the command to trace an ignored file to it's exclude rule - |
This needs a rebase @refack |
Ping @refack again |
I am closing this due to the long inactivity. @refack please feel free to reopen in case you would like to work on this again! |
Using
git ls-files -i --exclude-standard
to find tracked files that match ignore patterns.Before
https://gist.github.com/refack/62edafbbc788783ca9a7b8ee8354ae1c
After
The mismatch with
package-lock.json
files is fixed in #17330Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tools,build