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 a user guide with examples #266

Merged
merged 2 commits into from
Mar 31, 2023
Merged

Add a user guide with examples #266

merged 2 commits into from
Mar 31, 2023

Conversation

ehuss
Copy link
Collaborator

@ehuss ehuss commented Mar 20, 2023

This replaces the old tutorial with a new book that goes into more detail on various topics. It also contains a suite of examples to show different uses.

Closes #264

@ehuss
Copy link
Collaborator Author

ehuss commented Mar 20, 2023

There is a preview of what this looks like at: https://ehuss.github.io/cargo-bisect-rustc/introduction.html

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github has published starter workflows for publishing with Github Actions. I'd probably base this one on the mdBook workflow they've published instead of inventing my own.

Docs: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow
mDbook starter workflow: https://github.com/actions/starter-workflows/blob/main/pages/mdbook.yml

I also suspect that pinning the mdBook version will quickly result in outdated versions being used to build. Pretty sure Dependabot won't open PRs to update it.
One option would be cargo install mdbook but running that on each push is a waste of cpu cycles. Instead you could install it with taiki-e/install-action. That action gets regular updates so far, so I'd trust it more to stay up-to-date until proven otherwise.

Usage would be:

- uses: taiki-e/install-action@v2
  with:
    tool: mdbook

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally prefer to pin the version so that it uses a version known to work. Using something that installs an arbitrary "latest" version could break, particularly with semver-incompatible releases.

FYI, I'm the maintainer of mdbook. In terms of "inventing", this is the setup used on several rust-lang projects. There is a deploy script in simpleinfra which does something similar, but I prefer to keep it simple in terms of download, build, commit, push.

It might be nice to create a re-usable action hosted by rust-lang, but I haven't really had a chance to investigate what that would require.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using something that installs an arbitrary "latest" version could break, particularly with semver-incompatible releases.

Obviously. Unfortunately pinned versions end up being forgotten about and outdated all too often, which is why my preference would be putting out a minor fire once in a while if there's no better way to alert/remind me of updates that need to be done.

But since your preferences matter far more than mine in this repo: ¯\_(ツ)_/¯

@ehuss
Copy link
Collaborator Author

ehuss commented Mar 31, 2023

@oli-obk Just checking if you had any thoughts on this?

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I didn't check that everything was moved, but the summary looks good

.github/workflows/docs.yml Outdated Show resolved Hide resolved
@oli-obk oli-obk merged commit 331c3ea into rust-lang:master Mar 31, 2023
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.

Structured documentation and examples
3 participants