mapstruct / mapstruct-examples

Examples for using MapStruct
Other
1.28k stars 511 forks source link

Bazel example with mapstruct #109

Closed yishanhe closed 3 years ago

yishanhe commented 3 years ago
filiphr commented 3 years ago

This is really cool. Thanks a lot @yishanhe. Can we add a GitHub action for this as well?

yishanhe commented 3 years ago

This is really cool. Thanks a lot @yishanhe. Can we add a GitHub action for this as well?

will do. Thanks!

yishanhe commented 3 years ago

It seems like the second commit in this pull request doesn't trigger the action

yishanhe commented 3 years ago

Thanks for pointing out the issue. It is now fixed and I got the checks passed.

filiphr commented 3 years ago

Thanks a lot for your work on this @yishanhe.

Just out of curiosity (as I have 0 experience with Bazel). Why should the WORKSPACE file be in the root of the project?

yishanhe commented 3 years ago

@filiphr it is common practice, that WORKSPACE file sits at your project root, it declares all the external dependencies. bazel commands will only work below a directory having a WORKSPACE file.

I move it to root, so at root, you can just run bazel build //... and bazel test //.... Otherwise, I have to to cd into each folder.