Skip to content

Ship .gitattributes file to shrink the dist package #1020

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

Merged
merged 1 commit into from
Dec 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.* export-ignore
*.md export-ignore
tests export-ignore
docs export-ignore
examples export-ignore
mongo-orchestration export-ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory hasn't been updated in over two years and I think it's obsolete since stopped using Travis CI and migrated to GitHub Actions (including the mongo-orchestration action in drivers-evergreen-tools). I also found no references to this directory in the project.

@alcaeus: Do you concur that we should remove it entirely?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened PHPLIB-1058 to track this.

tools export-ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to include examples/ and tests/ in exports since they're intended for our users. @alcaeus: thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to refer to the documentation in this case. If someone really needs this, one can hop over to github or use prefer source composer option.

We save a lot of traffic when thinking about CI ✌🏻

It's up to you 🤓

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm admittedly in the minority of users that frequently jumps through the vendor/ directory to reference code. The impact on CI and users specifying --prefer-source are both good points. I'm on board with stripping all of this from the git archive in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

Makefile export-ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file might just be a candidate for removal, per #1021 (comment).

phpcs.xml.dist export-ignore
phpunit.evergreen.xml export-ignore
phpunit.xml.dist export-ignore
psalm.xml.dist export-ignore
psalm-baseline.xml export-ignore