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

Build improvements #720

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

Build improvements #720

wants to merge 1 commit into from

Conversation

dpash
Copy link
Contributor

@dpash dpash commented Jun 6, 2024

This adds a build and clean commands to composer.json to enable easier discovery of the build process for new developers.

Due to the clean deleting the raw directory. I've moved the gitignore into the top level .gitignore.

The available commands are added to the README.md

@dpash
Copy link
Contributor Author

dpash commented Jun 6, 2024

I'm not entirely sure if the extensions should be in require-dev instead.

@jlevers
Copy link
Owner

jlevers commented Jun 9, 2024

The reason I hadn't had the generation commands in composer.json is that to pass the schema filtering options there, you have to put a -- before the filter options, e.g. composer schema:generate --category seller --schema orders. I think you're right that they should actually go in composer.json, but maybe putting a note about that gotcha in the contributing notes you added would be good.

I also couldn't find a good way to pass those options into the build command, where Composer is referencing its own commands (e.g. @schema:generate). If you know how to do that, I'd love to make that work.

@jlevers
Copy link
Owner

jlevers commented Jun 9, 2024

Re: the extensions, I'm not sure either...the Composer docs seem to imply that you can put extensions in require-dev, but I haven't taken the time to figure out which extensions are required by dev packages and which aren't.

@jlevers
Copy link
Owner

jlevers commented Jun 10, 2024

Also just wanted to say -- I really appreciate all your recent contributions. This library takes a good bit of work to keep rolling, and a major motivation of the v6 overhaul was to make it easier for people to contribute, so it's cool to see that that's paying off. Thanks for your time and help!

This adds a `build` and `clean` commands to `composer.json` to enable
easier discovery of the build process for new developers.

Due to the `clean` deleting the raw directory. I've moved the gitignore
into the top level `.gitignore`.

The available commands are added to the README.md

Add single schema generation commands to README

We need to explain about the need for `--` in composer commands
@dpash
Copy link
Contributor Author

dpash commented Jun 10, 2024

I've added more information to the README.md.

Unfortunately you can't run composer build --schema=orders because it tries to add it to the pint command line too.

The composer documentation does mention being able to avoid the -- by using a class instead of a command, but this doesn't currently work with the individual commands. I can investigate this further later.

@jlevers
Copy link
Owner

jlevers commented Nov 7, 2024

@dpash I kinda dropped the ball here, but are you still interested in looking into getting the command line args to work? I think I was waiting to see where you went with that, which is why I never merged this.

If you'd like to leave it as is, I'm happy to merge this, but a) raw schemas are no longer gitignored and b) there's now a separate CONTRIBUTING.md file where the command line usage should go.

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