-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: add remark dependencies #16635
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.
Rubber-stamp LGTM
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.
LGTM
were there any other files not included in the initial PR?
No, only
|
Makefile
Outdated
cd tools/remark-cli && ../../$(NODE) ../../$(NPM) install; fi | ||
if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \ | ||
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi | ||
if [ ! -d tools/remark-cli/node_modules/fsevents/lib ]; then \ |
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.
This will try to rebuild on non-macOS every time right? I think fsevents is only needed on macOS, so this could be:
if [ "$(OSTYPE)" = darwin -a ! -d tools/remark-cli/node_modules/fsevents/lib ]; then \
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.
That seems to be right. I will replace this line with your comment.
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've replaced. CI also gets green :)
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.
Rubber stamp LGTM
f70ebe5
to
364218f
Compare
Makefile
Outdated
cd tools/remark-cli && ../../$(NODE) ../../$(NPM) install; fi | ||
if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \ | ||
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi | ||
if [ "$(OSTYPE)" = darwin -a ! -d tools/remark-cli/node_modules/fsevents/lib ]; then \ |
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.
Actually can you change if
to @if
, so it doesn't print the output (see #16551).
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 expect it's not actually necessary to build. It's only used by Chokidar and that has a fallback.
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.
In that case @watilde maybe just remove this and see whether it still works.
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 just removed the line and it's still working. As Ben mentioned, chokidar handles fsevents as an optional dependency. Let's go with it :)
question: can we |
Have we done a review of the licenses of the dependencies? |
364218f
to
cfc1dc5
Compare
I just used license-checker to review licenses
nothing looks out of the ordinary |
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.
Blocking for discussion about optimal dependency managment and CI
I could be wrong, but it looks to me like these were installed with:
but I think we can get a much reduced number of files (and packages) and a working installation with:
|
I hate to ask, but have we done this for other things where we ship |
IMHO the current solution is good (keeping just a "recipe" for installing), we need to optimize the CI machine. |
I had same question, discussion in #16640 & #16637 (comment) |
What I did was: |
I was basing my comment on the fact that I saw something listed in |
If we commit something into this repository that came from somewhere else then we have made a copy and are redistributing. At the very least we should be reviewing the license(s) to check that we conform. |
@Trott oops, no worries that's a good point! I just did double-check of |
cfc1dc5
to
bc5740b
Compare
Rebased and fixed conflicts. |
This would have fixed some issues we had at Code + Learn yesterday. Without this, initial |
@refack Do we still need to block? It would be nice if we can continue the discussion regardless of whether the patch is shipped or not :) |
@watilde I think @refacks -1 is because we haven't discussed whether including |
@watilde Looks like there's a conflict. Can you rebase? |
@watilde sorry, I'm strongly -1 for adding 2000 new files. It's also sort of "irreversible" since git will always remember these files even if we revert this 🤷♂️ Are there other benefits besides faster CI? |
@refack we have done this with every other dependency, it seems like we need a higher level policy around this if we are going to block specifically on this one |
If this is going to happen, it should happen in the same way it did for eslint. So there should be a script |
@MylesBorins In terms of |
bc5740b
to
f887f37
Compare
Another data point, the tarball release rule removes these directories: Line 833 in d597317
|
Rebased and fixed conflicts. @refack The other issue is that It's true that it's really difficult to review, but even if we do not add |
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.
Making it more explicit.
... there should be a script tools/update-remark.sh and we should also run dmn to clean the dependencies. Most of that script could probably be copied with just changing eslint for remark.
If this already exists please let me know. It's almost impossible to check the files changes with 2200 files added.
@watilde I agree it's a trade off between speed and size/complexity of the workspace. I just found out that the lint target is conditional on Lines 1082 to 1107 in d597317
Another option is to use a strategy like |
So it sounds like we are asking for a few different things
This pull request was opened because the current remark linter that landed broke the ability to test our builds in the tarball Since we are not reaching consensus about adding the dependencies today would it be possible to open another PR that at the very least fixes the testing while we figure this out? For the two tasks asked above, an update script and better management of deps... I don't think it is fair to hold this specific dependency to a higher standard than any other we have in the tree. If we want to block on that notion, we can, but we should open another conversation to discuss fixing this problem against all vendored dependencies in the repo |
@MylesBorins I don't think there's anything else in And I think it's reasonable to want this to be done the first time this is added to git because then we don't have to forever carry around files that shouldn't have made it in in the first place. |
@apapirovski that seems reasonable in regards to the script and running Either way we should prioritize fixing the test first, I'll see if I can get something together |
I thought it was opened to fix #16628, which isn't a test failure (just a slowdown in the linter CI job). Which test failure is that?
An alternative option would be a |
Sure, why didn't you ask sooner 😁 #16893 |
So for this scenario the |
Summary
Fixes #16628.
cc @gibfahn @maclover7
Checklist
make -j4 test
Affected core subsystem(s)
build, tools