-
Notifications
You must be signed in to change notification settings - Fork 451
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
Update CONTRIBUTING.md with the new build guide #2600
Update CONTRIBUTING.md with the new build guide #2600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lukaszkalnik 🙏
cc\ @JavierSegoviaCordoba and @raulraja are updating the Gradle config.
I think this update is correct, and will stay correct moving forward?
I added one more commit with information how to actually find out the names of the subprojects. I also improved the layout a little bit. |
Looks correct, except OP is missing information will come like spotless and suggest running spotlessApply before pushing. I suggest keep this PR open a bit until we are sure if the OP needs to add only spotless info or something so. Thank you 😀 |
@JavierSegoviaCordoba my PR is only about building the project locally, not pushing... |
@LukasKalnik if the project is not correctly formatted before pushing, PR will fail and the contributor will have to run |
Ok, thank you for the explanation. Then please let me know if I should add anything more to this PR. |
@lukaszkalnik @JavierSegoviaCordoba perhaps we can add a new step for that? (I think we should really think about automating that so that any contributor is not bothered with it 😛) Something like the following I think includes all information to correctly open a PR.
|
@nomisRev I see there is a whole section further below: I suppose that the build commands in the |
When trying to fix the "How to generate and validate documentation" section I've run into following issues:
Also there is no |
I removed the section about running Ank manually for now (as it is outcommented in |
We're in the process of updating our release process, and also how we build documentation since so much has changed from the legacy Dokka to the latest Dokka. Similarly the release process has compleltly changed from JVM only, to MPP. Sorry for these inconveniences, and thanks for helping to make these docs more accurately. So to reply to your questions:
Yes, you're 100% correct.
Yes, Ank has been replaced by the 1st party tool KotlinX Knit and it works as a kind of pre-processor to Dokka, but that is handled inside Gradle. Publishing, and generating docs is broken atm though. So not sure how that process will still change. |
Thanks for your support. I just feel a little underqualified but with your support I will try to make the requested changes. |
Shouldn't
So it looks like there are two cases:
Do I understand this correctly? |
I also see that Spotless is not yet included in the project (hence there is no |
On the other hand, as the build/release process is apparently still being changed, maybe it would make sense to just merge this PR (if you think it's correct) and add all other changes in a subsequent PR when you've finalized the migration of the build process? |
Hey @lukaszkalnik, No need to feel underqualified 😄 It's a big project, and the contribution guide is out of date due to the latest changes, so this contribution is great! The Arrow team is always happy to help anyone willing to contribution 👍 Your understanding of binary-compatibility-validator is correct, and you only need to call Spotless works similarly, Small note: |
Thanks! I'm happy to contribute, as this is a really interesting project.
I was thinking about the following scenario:
|
Ok, the workflow guide confirms my suspicion:
So in the scenario when the contributor changed the API in a binary incompatible way, he has to run So looks like when changing the API the changes to binary compatibility can only be detected by manual review, either by the contributor himself or by the reviewers of the PR. Maybe it would be a good idea to mention this as well? |
@nomisRev Ok, I see you wrote exactly that in the issue you linked:
|
Yes, that is entirely correct. The usage of the tool seems a bit unconventional, but I think it was designed in this way because sometimes across major versions you also need the ability to break the binary sometimes to remove old deprecated code. The burden should not be so much on the user though, since if If you want to verify locally that
@JavierSegoviaCordoba if we make |
Thanks for the clarification. I learn a lot from these explanations. What about the |
@nomisRev
Not sure if a pre-commit should run Another option is a pre-commit running This pre-commit can be installed automatically when the project syncs too, so the user hasn't to do it manually. |
@JavierSegoviaCordoba totally in favor of this, but I tried Gradle githooks for But both can be silently fixed on CI, without it affecting the purpose of the usage of Spotelss or Binary Validator. Ideally, a good editorconfig or KtFmt idea plugin always keep the code correctly formatted. |
@lukaszkalnik Api files have been automated by @serras 🥳 |
202ced5
to
04cdcb5
Compare
@nomisRev can you elaborate what exactly has been automated? Current state that I see on my other branch is:
Has this process now changed? |
I suspect you mean the change to |
I just added some Knit annotated code snippets to my other PR and I see that the build is now failing. |
@nomisRev @JavierSegoviaCordoba do you think these changes are helpful and correct so that we can merge this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this update is very valuable @lukaszkalnik! Thanks for updating it.
Everything looks correct to me and can be merged.
|
||
For code formatting we use [Spotless](https://github.com/diffplug/spotless/tree/main/plugin-gradle) with [KtFmt](https://github.com/facebookincubator/ktfmt) and for API binary compatibility we use [Binary Compatibility Validator](https://github.com/Kotlin/binary-compatibility-validator). They need to run before you commit and push your code to Github. | ||
|
||
If you've included those changes for binary compatibility and formatted the code correctly it's time to open your PR and get your contribution into Arrow. Thanks ahead of time for your effort and contributions 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hanks ahead of time for your effort and contributions 🙏
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part was actually originally your suggestion ;) I think it's very good too!
The project structure has changed and the old build guide didn't work anymore so I updated the CONTRIBUTING.md guide.
I also provided a link there for the Gradle subproject task names syntax, as it may be not obvious to all.