wpilibsuite/wpilib-docs

Convert inline code blocks to allwpilib snippets with RLIs

Aberta

#3.018 aberto em 23 de abr. de 2025

 (2 comentários) (0 reação) (0 responsável)JavaScript (297 forks)auto 404
Good First Issue

Métricas do repositório

Stars
 (187 estrelas)
Métricas de merge de PR
 (Mesclagem média 7d 6h) (14 fundiu PRs em 30d)

Description

frc-docs has ~700 java or c++ code blocks that are inline in the article. This causes maintenance issues as those code blocks aren't compiled against the latest wpilib, so breaking changes in wpilib can slip through and not be reflected in the docs. With the 2027 wpilib introducing more breaking changes to work with the new robot controller, this will be an even bigger issue.

frc-docs already has a number of articles that use RLI's from allwpilib examples. However many of the simple code blocks in frc-docs don't lend themselves to be good examples, and in the past we polluted the VS Code example list with too many examples.

wpilibsuite/allwpilib#7909 introduces the infrastructure for "snippets" that get compiled in every wpilib build like the examples, but separately so they don't pollute the VS Code example list. #3017 then updates the Encoder frc-docs article to use the Encoder snippets. All the inline code blocks should be PRed to snippets in allwpilib and then PRed to frc-docs to replace the code blocks with RLIs to the snippets.

Guia do colaborador