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

Apply for export-ignore towards better release packages #69

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

stronk7
Copy link
Member

@stronk7 stronk7 commented Sep 24, 2023

When used as a dependency in other projects, we don't want the release packages to include any development file. This includes CI files, test files, docs...

This is useful to both:

  • Reduce the package sizes noticeably.
  • Ensure that composer, by default, (--prefer-dist) doesn't include them. If anybody prefers to get the complete version they always can use --prefer-source or clone the repository.

This is considered good practice, as far as there can be problems with tests and other stuff when the dependencies include everything.

When used as a dependency in other projects, we don't want
the release packages to include any development file. This
includes CI files, test files, docs...

This is useful to both:
- Reduce the package sizes noticeably.
- Ensure that composer, by default, (--prefer-dist) doesn't
  include them. If anybody prefers to get the complete version
  they always can use --prefer-source or clone the repository.

This is considered good practice, as far as there can be problems
with tests and other stuff when the dependencies include everything.
@codecov
Copy link

codecov bot commented Sep 24, 2023

Codecov Report

Merging #69 (315f8ed) into main (ff540d2) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main      #69   +/-   ##
=========================================
  Coverage     96.30%   96.30%           
  Complexity      497      497           
=========================================
  Files            21       21           
  Lines          1407     1407           
=========================================
  Hits           1355     1355           
  Misses           52       52           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@stronk7
Copy link
Member Author

stronk7 commented Sep 24, 2023

For the records, I've faced with this problem with this (draft) pull request:

moodlehq/moodle-local_codechecker#221

There, you can see how moodle-local_codechecker tries to execute moodle-cs own tests when it's installed via Composer. Right now the only alternative that I've in the plugin is to add some post-xxxx Composer script proceeding to remove those files.

Ciao :-)

stronk7 added a commit to stronk7/moodle-local_codechecker that referenced this pull request Sep 24, 2023
This step will be needed until this PR:

moodlehq/moodle-cs#69

is merged and released. Then we can get rid of it. Note
the reason is that phpunit finds the tests under vendor
and tries to execute them. As far as moodle-cs is now
just a dependency we don't want it to contain any
developing code (ci, tests, docs...) in its distribution form.
stronk7 added a commit to stronk7/moodle-local_codechecker that referenced this pull request Sep 24, 2023
This step will be needed until this PR:

moodlehq/moodle-cs#69

is merged and released. Then we can get rid of it. Note
the reason is that phpunit finds the tests under vendor
and tries to execute them. As far as moodle-cs is now
just a dependency we don't want it to contain any
developing code (ci, tests, docs...) in its distribution form.
@andrewnicols andrewnicols merged commit f6290f6 into moodlehq:main Sep 24, 2023
7 checks passed
@stronk7 stronk7 deleted the apply_for_export_ignore branch September 24, 2023 14:19
@stronk7
Copy link
Member Author

stronk7 commented Sep 24, 2023

Tatata!

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.

2 participants