wpilibsuite/wpilib-docs

Convert inline code blocks to allwpilib snippets with RLIs

開放

#3,018 建立於 2025年4月23日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (297 個分叉)auto 404
Good First Issue

倉庫指標

星標
 (187 顆星)
PR 合併指標
 (平均合併 7天 6小時) (30 天內合併 14 個 PR)

描述

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.

貢獻者指南