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

Remove exemption for print.html from link checking #346

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

sirhcel
Copy link
Contributor

@sirhcel sirhcel commented May 31, 2021

This is a remake of #255 for the actual GitHub Actions.

The need for keeping this exemption around no longer exists since a while. Let's remove it and pave the way for closing #255.

Link checking passes without any issues with the current release of mdbook:

$ mdbook --version
mdbook v0.4.8
$ mdbook build
2021-05-31 22:34:19 [INFO] (mdbook::book): Book building has started
2021-05-31 22:34:19 [INFO] (mdbook::book): Running the html backend
$ linkchecker book
INFO linkcheck.cmdline 2021-05-31 22:34:25,644 MainThread Checking intern URLs only; use --check-extern to check extern URLs.
LinkChecker 10.0.1
Copyright (C) 2000-2016 Bastian Kleineidam, 2010-2021 LinkChecker Authors
LinkChecker comes with ABSOLUTELY NO WARRANTY!
This is free software, and you are welcome to redistribute it under
certain conditions. Look at the file `LICENSE' within this distribution.
Get the newest version at https://linkchecker.github.io/linkchecker/
Write comments and bugs to https://github.com/linkchecker/linkchecker/issues

Start checking at 2021-05-31 22:34:25+002
10 threads active,   120 links queued,   84 links in 214 URLs checked, runtime 1 seconds

URL        `../appendix/2-how-to-use-gdb'
Name       `How to use GDB'
Parent URL file:///[...]/discovery/book/05-led-roulette/debug-it.html, line 420, col 98
Real URL   file:///[...]/discovery/book/appendix/2-how-to-use-gdb/
Check time 0.003 seconds
Warning    [file-missing-slash] Added trailing slash to
           directory.
Result     Valid: directory

Statistics:
Downloaded: 2.15MB.
Content types: 34 image, 87 text, 0 video, 0 audio, 158 application, 0 mail and 170 other.
URL lengths: min=8, max=180, avg=66.

That's it. 449 links in 449 URLs checked. 1 warning found. 0 errors found.
Stopped checking at 2021-05-31 22:34:30+002 (4 seconds)

This is a remake of rust-embedded#255
for the actual GitHub Actions.
@sirhcel sirhcel requested a review from a team as a code owner May 31, 2021 20:39
@rust-highfive
Copy link

r? @adamgreig

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources labels May 31, 2021
sirhcel added a commit to sirhcel/discovery that referenced this pull request May 31, 2021
Linkchecker warned about this link to a directory without a trailing
slash. Seen while working on
rust-embedded#346.
Copy link
Member

@eldruin eldruin left a comment

Choose a reason for hiding this comment

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

Nice catch. Thanks!

bors r+

@bors bors bot merged commit 80b6761 into rust-embedded:master Jun 1, 2021
bors bot added a commit that referenced this pull request Jun 1, 2021
347: Clean up warning from linkchecker r=eldruin a=sirhcel

Linkchecker warned about this link to a directory without a trailing slash. Seen while working on #346.

Link checking now completes without any warnings:
```bash
$ mdbook build
2021-05-31 22:49:44 [INFO] (mdbook::book): Book building has started
2021-05-31 22:49:44 [INFO] (mdbook::book): Running the html backend
$ linkchecker book
INFO linkcheck.cmdline 2021-05-31 22:49:55,452 MainThread Checking intern URLs only; use --check-extern to check extern URLs.
LinkChecker 10.0.1
[...]
Start checking at 2021-05-31 22:49:55+002
10 threads active,   162 links queued,  205 links in 377 URLs checked, runtime 1 seconds

Statistics:
Downloaded: 2.15MB.
Content types: 34 image, 87 text, 0 video, 0 audio, 158 application, 0 mail and 170 other.
URL lengths: min=8, max=180, avg=66.

That's it. 449 links in 449 URLs checked. 0 warnings found. 0 errors found.
Stopped checking at 2021-05-31 22:50:00+002 (4 seconds)
```

Co-authored-by: Christian Meusel <christian.meusel@posteo.de>
@sirhcel sirhcel deleted the dont-exclude-print-html branch June 5, 2021 12:39
tomoyuki-nakabayashi added a commit to tomoyuki-nakabayashi/discovery that referenced this pull request Jan 16, 2022
* Tweak testing cargo-binutils

While following the instructions for cargo-binutils in 03-setup
the `cargo size -- -version` caused an error when following the
instructions:

``` console
$ cargo size -- -version
error: Error during execution of `cargo metadata`: error: could not find `Cargo.toml` in `C:\Users\wink` or any parent directory
```

The cause of the error is that you're not told to  be in a rust project
directory.

The solution I've chosen is to create a rust bin project, cd into the
project, run it and then do the `cargo size -- -version`.

* Fix installing dateutil since it is now a dependency of the GHP import script

* New-06-hello-world

Converted lib.rs, Cargo.toml to use stm32f3_discovery.

.cargo/config:
 I also, found that I would forget to to use `--target` when
 building and running using cargo so set the default build target
 to thumbv7em-none-eabihf

openocd.cfg:
 Since the monitor lines are quite long and also easy to mistype or
 forget to do I enhanced the file with the new lines and commented
 on each of the lines.

README.md
 Update to reflect the above changes.

* Tweak panic.md

As suggested by @eldruin add backticks around ~/.gdbinit.

* add two notes flagging lsm303agr

* fix typo, link

Fix typo, link.

* Tweak 05-led-roulette

After doing 06-hello-world I felt some tweaks and cleanup
were needed in debug-it.md and the-led-and-delay-abstractions.md.

* New 07 Registers

Modified to run using `stm32f3-discovery` instead of `f3` and updated
the `.md` files appropriately.

* Updates from eldruin first review

Thanks

* Fix broken ci build

This is the solution @eldurin had suggested.

* Update-03-setting-up-a-dev-env

Update `*.md` files so that copy-to-clipboard button in code blocks
works so that commands can be copied and pasted into terminal windows.

Some reorganization of the text for clarity.

* Update 05 led-roulette

Cargo.toml to use stm32f3-discovery v0.6.0 crate.

Update `.md` files with additional information and to make console
commands amenable to copy/paste operations.

* Use nano as the editor

As suggested by reviewers @eldruin and @therealprof, txs!

* Add Update .cargo/config sub-section

Also, added a note that .cargo/config may need to be modified
in every chapter.

* temporary fix for CI until we rewrite this chapter

* Increase Travis no-output waiting time

* Add shareable instances of config.toml and openocd.gdb

Instead of every chapter having its own copy of the cargo configuration
and openocd.gdb files this change creates a shared set. This will make it
much easier for the user of the discovery book to handle the situation
where their Arm gdb is NOT arm-none-eabi-gdb. As only the shared copy
of .cargo/config.toml will have to be modified.

Also src/05-led-roulette is updated to take advantage of this and I
will go through each of the other chapters changing them to use
the shared set.

I also needed to comment out the rustflags variable in all of the config
files as I'd get an error executing ci/script.sh:

  ry.x:5: region 'FLASH' already defined
          >>>   FLASH : ORIGIN = 0x08000000, LENGTH = 256K
          >>>

* Update 06-hello-world to use shared cargo config

 - Updated `*.md` files.
 - Deleted the local .cargo/config and openocd.gdb files.

* Swap to GHA.

* Swap to GHA.

(cherry picked from commit 681b95a)

* Adapt to rewrite

* Update send-a-string.md

* Remove several chapters as decided with @eldruin

* Remove LEDs again since its only really a deeper look into LEDs on
  register level which we don't need in the discovery book

* Remove Clock and Timers basically for the same reason as LEDs again
* Remove the two bluetooth chapters since the NRF51 chip has onboard
  bluetooth, however using it in a beginner scenario is presumably not a
  good idea until rubble has matured more.

* remove removed chapters from Cargo.toml

* Change the introduction of I2C to match the micro:bit

* Modify the LSM303AGR section of the I2C chapter for micro:bit

* move 14-i2c to 08-i2c

* Fix the CI for I2C

* Update flash-it.md

fixed typo
"First thing we need ~is~ to do is launch OpenOCD."

* Fix small typo in Linux setup

My device has identical `idProduct` and `idVendor` values to the one used for the documentation.

`lsusb | grep STM` outputs:
```
Bus 003 Device 033: ID 0483:374b STMicroelectronics ST-LINK/V2.1
```

The verbose version, `lsusb -v`, outputs
```
  ...
  idVendor           0x0483 STMicroelectronics
  idProduct          0x374b ST-LINK/V2.1
  ...
```

Which leads me to the belief that the first value in the short output is the vendor and the latter is the product.

* the rest of I2C without my solution

* Fix breaking change in  cortex-m 0.5.11.

Fix it by sticking with cortex-m 0.5.6.

* Cleanup from review comments -- use cortex-m 0.5.6 in chapters 14 & 15

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Fixes and I2C challenge solution

* Update src/08-i2c/using-a-driver.md

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Attempt to fix the build

* change bors.toml to match the new chapters

* Fixed typos regarding `.cargo/config.toml`

The file keeps on being referred to as either `cargo/config.toml` or `.cargo/config.toml`. This PR corrects all of them to `.cargo/config.toml`

* fix typo

* Update README.md

fix typo.

* Fix compile error

fix(09-clocks-and-timers): Compile failed in release mode

docs: Update putting-it-all-together.md

fix: compile error in chapter 11

fix: compile error in chapter 14

fix: compile error in chapter 15

fix: compile error in chapter 16

chore: handle `Result` with unwrap rather than ok

chore: remove useless dependencies

fix: restore main.rs

* Clean up warning on unused result

* Remove unused panic handlers (panic-halt)

Declaring panic-halt as a depencency works fine for building the example
code. But it makes 'cargo doc' fail due to the duplicate lang item
'panic_impl'.

* Check building docs with CI too

eldruin suggested to add doc generation to CI
(rust-embedded#322 (comment))
which seems a great idea to me.

* Remove exemption for print.html from link checking

This is a remake of rust-embedded#255
for the actual GitHub Actions.

* Clean up warning from linkchecker

Linkchecker warned about this link to a directory without a trailing
slash. Seen while working on
rust-embedded#346.

* Update README.md: about the SB10 on old version

* Update src/06-hello-world/README.md

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* fix typos in openocd.gdb comments

* fix bsrr in rtrm.md

* Fix typo

* Clean up writing to USART TDR which is safe is again

This issue got fixed with stm32f3 0.13.1 and writing to TDR is safe
again. This prepares updating the dependencies to actually use this
release.

* Update PAC and GPIO usage for upcomming PAC/HAL

* Update using Serial to upcoming changes from more-tests

* Add local MonoTimer replacement

MonoTimer is used by 11-usart's aux11 module and the buffer-overrun
solution. It got deprecated after stm32f3xx-hal release 0.6.1. This is a
copy of
https://github.com/stm32-rs/stm32f3xx-hal/blob/c68c36c03e0e33699b3b0c9acc3f8d80f5a25cd4/src/time.rs#L91
minus the time units which can be used from embedded-time.

* Bump BSP to latest release fixing TDR access

* Bump other dependencies of 11-usart

* Factor out 11-usart example code to included files

When running 'mdbook test' on the book the example code checking fails
to handle for example macros like '#[entry]' and the local auxiliary
crates. Having most code examples included from 'examples/' allows to
check them at least with 'cargo build --target thumbv7em-none-eabihf
--examples'.

* Make 11-usart example code safe again

Updating stm32f3xx-hal makes accessing these registers safe as it should
be.

* Clean up warnings about unused variables

* Bump heapless to latest release

* Mention newer Rust version required by 11-usart

* Build examples in CI as well

* Factor out 05-led-roulette examples

* Bump dependencies of 05-led-roulette

* Fix debug example to actually show led-roulette

* Fix some flaws in the "LED roulette" section

* Use an en dash instead of a simple hyphen

* Guide to disussions and issues in README.md

Several questions have ended up in the issues recently. So what about
pointing the discussions section out more prominently?

* Wording changes to new discussions section in README

* Fix instructions for installting GDB on Fedora

Issue rust-embedded#364 reports that
the package arm-none-eabi-gdb has been dropped from Fedora (30-ish).
Their Bugzilla issue
https://bugzilla.redhat.com/show_bug.cgi?id=1859627#c23 recommends
installing the toolchain provided by arm and that is what the section
'Other distros' in the book does as well.

A gdb-multiarch package does not seem available at a first glance.

* Rewrite of chapter 2 for microbit v2

* Fix broken links

* Chapter 3 rewrite for micro:bit v2

* Fix typo in 05-led-roulette/the-challenge

The text said to modify `../.cargo/config.toml`, but the command was given to modify `../openocd.gdb`.

* Chapter 4 micro bit v2 rewrite

* Update Fedora and Linux verification steps

* 8.3: Use `write` instead of `modify`

Since the read value is ignored, using `modify` seems redundant. 
Also, `modify` isn't mentioned in the text prior this chapter, while `write` is explained.

* Precise version specification of the v1 microbit

* Add a terminology explanation section to ch4

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Attempt to split the sentence up a bit

* ch05 ch06 rewrite for micro:bit v2

- Ported all the code to the microbit BSP
- Tested all the code commands etc. on v1.5 and v2
- ch06 doesn't need to be touched I think
- currently relying on the git version of microbit since it
  introduces quite a few nice new APIs we want to use,
  microbit is (hopefully) going to make a release before
  this rewrite actually gets published
- the solution to the ch05 challenge is arguably the most stupid
  way you could come up with to generate the matrix, at the
  same time this makes it simple enough to be understood by everyone
  though, which is certainly more important in this case

* Fix CI for rewrite

* Install the proper toolchain for older variants

* I just shouldn't have touched toolchains...

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Update src/05-led-roulette/flash-it.md

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Adopt bors to the new CI

* Fix typo in openocd.gdb

* serial chapter first steps

* Initial subchapter of ch07

* Rest of ch07

* Restore the old main

* Unsafe is fine since we need it for statics

* Flush

* Build ch07 the right way in CI

* Initial ch08 code and documentation

* First micro:bit v2 version of ch08

* Unsafe code for the v2 wrapper

* Fix the CI for ch08

* Fix the ci for ch07

* WIP ch09

* Add a ton of new links to what's left to explore

* Update the troubleshooting section for micro:bit

* Add remark about Awesome Rust Embedded

* Update microbit to upstream git version

* Update to upstream git version of microbit

* Next compass attempt

* Fix the CI

* Fix i2c link

* This note is wrong

* Update src/appendix/1-general-troubleshooting/README.md

* Update the-general-protocol.md

fix grammar

* Chapter 10

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Apply suggestions from code review

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Add link to the twim module

* Use `cargo embed` instead of `cargo-embed`

Replaces dash with whitespace since the version if the dash is not working.

* Add rustup target add to verification step and modify c5 slightly

* Typos and grammar changes

* Make terminology parts sub-sections

This allows us to deep link to them from other parts of the discovery
book.

* Calibration implementation and the rest of ch09

* Update src/09-led-compass/magnitude.md

Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>

* Add note about libm sqrtf function.

* Fix minor typo in Ch 6 documentation

* Fix typo in Chapter 8 text

* Clarify the units

* update the git microbit versions to 0.11

* Update the lsm303agr version

* Update dependencies and remove unused ones

* Update versions of links

* Quote all modules

* Fix the ls command in 03-setup/verify.md

* Uniform delay types

* fixing dependency changes

* Move existing discovery book into f3discovery subfolder.

* Move new microbit book into its own directory

* Strip some README cruft from new front page.

* Fix GHA

* Copy missing image assets to microbit from f3discovery

* Fix cargo-doc run for micro:bit

* Death to all typos

Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>

* Death to the rest of the typos

* Clarify README.md

* Clarify how to search for HAL crates

* Direct HAL list link

* Link to an RTOS list

* Look!

* Only use one panic implementation at a time in led roulette.

* Fix bors CI status names

* Add build-doc CI runs to bors too

* fix typos in background(README.md)

* Fix broken link to c3

Change absolute link to relative

* Update debug-it.md

Try a / at the end

* Fix Readme/index issue for link

* Use specific chip for micro:bit v1 board.

probe-rs 0.12 changed from accepting generic chip description ("nrf51822")
to requiring specific chip description (e.g. "nrf51822_xxAA").

According to dirbaio on probe-rs matrix "there's three nrf51822 variants
with different flash/ram sizes, AA/AB/AC.
AA is 256k flash, 16k ram, afaik all microbit v1's are AA"

Without this change, when I attempted the `cargo embed` step I got
`Error... Found multiple chips matching 'nrf51822', unable to select a single chip.`

* Fix typo in verify.md: nrf51822-xxAA -> nrf51822_xxAA

* Fix micro:bit V1 chip specification everywhere

* Update micro:bit chip descriptions in the book

* In serial communication chapter, point to location of serial device for MacOS (info from https://makecode.microbit.org/device/serial).

* Use more specific chip spec for micro:bit v2

* Run cargo-doc on relevant target instead of native

* Fixed "cargo size" argument

Fixed error: unknown argument '-version', did you mean '--version' when executing 'cargo size -- -version'.

* Added a screenshot for PuTTY

The screenshot shows how to configure Session / Connection type = Serial.

* Improved PuTTY configuration

Added new screenshot showing how to set up PuTTY "Session" screen.

* Show changed PuTTY setting

Changed screenshot of the PuTTY "Connection / Serial" screen showing how it should be filled.

* Update reverse-a-string.md

Update `heapless::vec` to use const generics

Co-authored-by: Wink Saville <wink@saville.com>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Co-authored-by: Diego Barrios Romero <eldruin@gmail.com>
Co-authored-by: waalge <waalgy@gmail.com>
Co-authored-by: Jesse Parsons <59420931+leetie@users.noreply.github.com>
Co-authored-by: Henrik Böving <hargonix@gmail.com>
Co-authored-by: Adam Greig <adam@adamgreig.com>
Co-authored-by: NisarAbbasi1978 <66704815+NisarAbbasi1978@users.noreply.github.com>
Co-authored-by: D4ntin <9372835+D4ntin@users.noreply.github.com>
Co-authored-by: Jonathan Arnett <jonarnett90@gmail.com>
Co-authored-by: Patrick Doyle <wpdster@gmail.com>
Co-authored-by: Ricardo Delfin <me@rdelfin.com>
Co-authored-by: Dezhi Wu <wu543065657@163.com>
Co-authored-by: Christian Meusel <christian.meusel@posteo.de>
Co-authored-by: chirping78 <chirping78@hotmail.com>
Co-authored-by: Jonah Stiennon <jonahss@gmail.com>
Co-authored-by: Nitin Saxena <Nitin.Saxena@knoldus.com>
Co-authored-by: Danny Moesch <danny.moesch@icloud.com>
Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
Co-authored-by: Anthony J. Martinez <anthony@ajmartinez.com>
Co-authored-by: Devon Kerkhove <devon@skyon.be>
Co-authored-by: Jeff Shen <22137276+al-jshen@users.noreply.github.com>
Co-authored-by: Chris <11088935+caemor@users.noreply.github.com>
Co-authored-by: Christoph <christoph.gross@student.uni-tuebingen.de>
Co-authored-by: Rob Young <rob@robyoung.digital>
Co-authored-by: Stephen Kaiser <freesol29@gmail.com>
Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
Co-authored-by: Gary Capell <gary.capell@gmail.com>
Co-authored-by: Viacheslav Dobromyslov <viacheslav@dobromyslov.ru>
Co-authored-by: Daniel Hayes <59458913+dkhayes117@users.noreply.github.com>
Rimpampa pushed a commit to Rimpampa/discovery that referenced this pull request Jan 18, 2022
Linkchecker warned about this link to a directory without a trailing
slash. Seen while working on
rust-embedded#346.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants