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

Add jbang example to the manual #11492

Closed
2 tasks done
lukaseder opened this issue Feb 22, 2021 · 9 comments
Closed
2 tasks done

Add jbang example to the manual #11492

lukaseder opened this issue Feb 22, 2021 · 9 comments

Comments

@lukaseder
Copy link
Member

lukaseder commented Feb 22, 2021

Apparently, running the jOOQ code generator with jbang is super easy:
https://twitter.com/maxandersen/status/1363803581397278721

We should document this in the manual/tutorial.

Tasks

  • Document this in the manual / tutorial
  • Add a "jbang-catalog" (see tweet) to further simplify this
@maxandersen
Copy link
Contributor

if you create a jbang-catalog repo I can submit PR with how I think this should/could work ;)

@lukaseder
Copy link
Member Author

That sounds great, though is a repo the right place for this? Usually, I prefer modules or example projects, not a top level repo. Is there a reason why a repo is better, except to simplify the PR?

@maxandersen
Copy link
Contributor

its just that if you put it in lets say jooq/jooq then it would be jbang codegen@jooq/jooq instead of just jbang codegen@jooq.

I can definitely start with a pr on jooq/jooq if you want that.

maxandersen added a commit to maxandersen/jOOQ that referenced this issue Feb 22, 2021
@maxandersen
Copy link
Contributor

Made a PR against jooq/jooq to show what I'm talking about. Details in #11492

I do recommend using jooq/jbang-catalog, but up to you.

@maxandersen
Copy link
Contributor

btw. I used the word codegen as that seem to be the word used in docs; but maybe gentool is more apropriate.

And we could also add most common jdbc drivers as direct //DEPS but I thought nice to have explicit control using --deps.

@maxandersen
Copy link
Contributor

I meant #11499 - copy/paste error

@lukaseder
Copy link
Member Author

its just that if you put it in lets say jooq/jooq then it would be jbang codegen@jooq/jooq instead of just jbang codegen@jooq.

Oh, so these coordinates are github based? I'll have to do some reading first, but given that jOOQ/jOOX and other libraries exist, I guess it wouldn't be correct to assume a jOOQ/jbang-catalog github project is jOOQ's only, as opposed to any other's.

On the other hand, currently, there's no conflict in our namespace with respect to codegen, so this might still be changed later on if some other library ever does introduce code generation...

btw. I used the word codegen as that seem to be the word used in docs; but maybe gentool is more apropriate.

The module is called jooq-codegen, so I think it's a good idea to reuse that term.

@maxandersen
Copy link
Contributor

You can also always introduce a repo specific jbang catalog or just prefix them to avoid conflicts in future.

@lukaseder
Copy link
Member Author

Here's a working example: https://github.com/jOOQ/jbang-example/blob/main/README.md. I'll add that also to the manual, and I think we're all set!

Really nice work with jbang, @maxandersen !

3.15 Other improvements automation moved this from To do to Done Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants