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

API migration guide. #1133

Merged
merged 31 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c303328
API migration guide.
wks May 6, 2024
0fa5d80
Check if the migration guide is updated when we have API change
qinsoon May 6, 2024
7e88e32
Move migration guide to a separate folder
qinsoon May 7, 2024
10b29e9
Test API change
qinsoon May 7, 2024
06eb989
Fix the condition for running migration doc check
qinsoon May 7, 2024
65ffd15
Revert API change.
qinsoon May 7, 2024
0db7a48
Changed to the bullet point style
wks May 7, 2024
72b236e
Ignore migration guide check in merge check
qinsoon May 7, 2024
fcd3fc2
Not that concise. Index by type or module
wks May 8, 2024
a8791d5
Add template and adjust style
wks May 8, 2024
be69dd5
Merge remote-tracking branch 'refs/remotes/wks-github/feature/api-cha…
wks May 13, 2024
5a3ce27
Remove irrelevant comments and do minor changes
wks May 13, 2024
0e69c51
Collapsible details and isolated template.
wks May 13, 2024
b617b28
Merge branch 'master' into feature/api-change-log
wks May 13, 2024
4aefd6e
Do not run the JS code outside API migration guide
wks May 13, 2024
39b4e42
Formatting guide for Vim and VSCode.
wks May 14, 2024
09e0fcd
Use mdbook-admonish for tl;dr
wks May 14, 2024
72c9ae2
Allow showing TL;DR only
wks May 14, 2024
9fc6328
Minor changes to tl;dr
wks May 14, 2024
5d049c8
Move files around
wks May 14, 2024
b9f4fb7
Do not fold the next H2 into the details tag
wks May 14, 2024
ed1a383
Clarify about qualified names and "only affect ..."
wks May 15, 2024
63047cf
Allow hidding the template when publishing.
wks May 15, 2024
ca78aab
Remove redundant tag in book.toml
wks May 15, 2024
247229d
Update docs/userguide/book.toml
qinsoon May 15, 2024
0dbac85
Merge branch 'master' into feature/api-change-log
wks May 22, 2024
26cdf9f
Add changes for edge -> slot
wks May 22, 2024
f3d2902
Remove the "VM bindings should reimplement..." title
wks May 22, 2024
8f93d0f
Add links for the edge -> slot change
wks May 22, 2024
bfa1de6
Minor changes
wks May 22, 2024
1ccc050
Update template
wks May 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/ci-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ cargo build

# Install mdbook using the stable toolchain and the default target
unset CARGO_BUILD_TARGET
cargo +stable install mdbook
cargo +stable install mdbook mdbook-admonish mdbook-hide
mdbook build $project_root/docs/userguide
21 changes: 21 additions & 0 deletions .github/workflows/api-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,24 @@ jobs:
run: cargo install cargo-public-api
- name: API Diff
run: cargo public-api diff origin/${GITHUB_BASE_REF}..${{ github.event.pull_request.head.sha }} --deny=all

check-api-migration-update:
needs: check-public-api-changes
runs-on: ubuntu-latest
if: ${{ always() && needs.check-public-api-changes.result == 'failure'}}
env:
MIGRATION_GUIDE_PATH: 'docs/userguide/src/migration/**'
steps:
# Check if migration guide is updated.
- name: Get the update status for the migration guide.
uses: tj-actions/changed-files@v44
id: migration-guide-status
with:
files: ${{ env.MIGRATION_GUIDE_PATH }}
# If the api check failed but the migration is not updated, we fail here
- name: Report if the migration guide is not updated.
if: ${{ steps.migration-guide-status.outputs.any_changed == 'false' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('Public API is changed, but the migration guide (${{ env.MIGRATION_GUIDE_PATH }}) is not updated. If the bindings need to be updated for the API change, the migration guide needs to be updated as well.')
1 change: 1 addition & 0 deletions .github/workflows/merge-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ env:
"ready-to-merge",
"check-broken-links-in-docs",
"check-public-api-changes",
"check-api-migration-update",
"minimal-tests-core/x86_64-unknown-linux-gnu/stable",
"minimal-tests-core/i686-unknown-linux-gnu/stable",
"minimal-tests-core/x86_64-apple-darwin/stable",
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rustdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
run: |
sed -i 's/^version = "[0-9]\+.[0-9]\+.[0-9]\+/&-'${GITHUB_SHA}'/' Cargo.toml
- name: Generate rustdoc
env:
# Override preprocessor.hide.hide in book.toml to hide some chapters.
MDBOOK_preprocessor__hide__hide: "true"
run: ./.github/scripts/ci-doc.sh
- name: Copy docs
# docs.mmtk.io is the root for github pages.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ To integrate MMTk with your language implementation, you need to provide an impl
you can optionally call MMTk's API for your needs.

For more information, you can refer to our [porting guide](https://docs.mmtk.io/portingguide/prefix.html) for VM implementors.
We maintain a [migration guide](https://docs.mmtk.io/migration/prefix.html) to help VM implementors to migrate MMTk to newer versions.

### Implement your GC

Expand Down
10 changes: 10 additions & 0 deletions docs/userguide/assets/css/api-migration-details.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* Make the "show details" text on the third level smaller and keep the same indentation as the folded sub-list. */
#api-migration-detail-body details.api-migration-level3-detail > summary {
padding-left: 2em;
font-size: small;
}

/* Hide the "show details" when open, to keep the text less cluttered. */
#api-migration-detail-body details[open] > summary {
display: none;
}
Loading
Loading