Skip to content
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

Remove /tests folder from pull #618

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bert-w
Copy link

@bert-w bert-w commented Feb 18, 2025

The /tests folder is several MBs big. It sounds like developers don't need this folder when they depend on this package and install it through Composer, so I have excluded it in .gitattributes.

Copy link
Member

@MauricioFauth MauricioFauth left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.

I would love to not have the tests directory when installing using Composer, but other distribution methods usually need the tests to be present. So we can't add it to the .gitattributes file.
Sorry.

@MauricioFauth MauricioFauth self-assigned this Feb 20, 2025
@MauricioFauth
Copy link
Member

On the other hand, finding a way to reduce the size of the tests would be great!

@williamdes
Copy link
Member

@MauricioFauth I think we can re open and accept it
On Debian I will switch to git mode and get the files

@bert-w
Copy link
Author

bert-w commented Feb 20, 2025

@MauricioFauth what are the use cases exactly? I don't know in which other ways this repository is being used atm.

@MauricioFauth
Copy link
Member

@remicollet Could you please comment on this? In 2017, you were against adding the tests directory to the .gitattributes file with the attribute export-ignore. Has that changed since then? If not, nothing will change. Thank you.

@williamdes
Copy link
Member

@MauricioFauth what are the use cases exactly? I don't know in which other ways this repository is being used atm.

Ref: https://tracker.debian.org/pkg/phpmyadmin-sql-parser

Debian imports the source code of projects into it's own git (I can work without git)
To (import/detect versions) of sql-parser Debian uses uscan, config: https://salsa.debian.org/phpmyadmin-team/sql-parser/-/blob/debian/5.10.3-1_bpo12+1/debian/watch?ref_type=tags#L5
Uscan is currently configured to pull the vendor tarball
But Debian also ensures that it's packages work, so it "needs" to run the upstream tests.
That's the reason why the folder is required.
That said, there is a git mode like in this example: https://salsa.debian.org/phpmyadmin-team/tcpdf/-/blob/debian/6.8.2+dfsg-1_bpo12+1/debian/watch?ref_type=tags#L3

Switching to git mode looks like that: https://salsa.debian.org/phpmyadmin-team/tcpdf/-/commit/4b43e784532c7ddf5b75342969fc7e24931f269f
I had to do it because TCPDF removed the examples/ folder recently
And examples are useful and ran as tests.

PS: the uscan config (debian/watch) is also used to detect new upstream releases to package.

I will let @remicollet explain to us how it works for them/Fedora

@remicollet
Copy link
Contributor

I will let @remicollet explain to us how it works for them/Fedora

In Fedora we use a git snapshot to workaround this broken sources issue

I still think that using .gitattributes is a shame. It is a terrible workaround for the lack of an installer for PHP libraries.
But I gave up the fight, so do the fuck you want

@williamdes
Copy link
Member

williamdes commented Feb 28, 2025

@MauricioFauth let's get it clean for users ?
We have much more users now than the project is used for Larastan

Edit: target QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants