Repository navigation
Remove dead code from bun_options_types and bun_http_types #35152
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
Changes from all commits
7b6eb3f
da9816a
3f4e095
f79e101
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| //! `Loader` + `SideEffects`. | ||
| //! | ||
| //! Data-only enum + pure predicates. `to_api()` / `from_api()` / `API_NAMES` / | ||
| //! `LoaderOptional::from_api` live in `bun_options_types::LoaderExt` (would | ||
| //! back-edge into the schema crate). `to_mime_type` / `from_mime_type` live in | ||
| //! `bun_http_types` (would back-edge into `bun_http::MimeType`). | ||
| //! Data-only enum + pure predicates. `to_api()` / `from_api()` / `API_NAMES` | ||
| //! live in `bun_options_types::LoaderExt` (would back-edge into the schema | ||
| //! crate). `to_mime_type` / `from_mime_type` live in `bun_http_types` (would | ||
| //! back-edge into `bun_http::MimeType`). | ||
|
Check warning on line 6 in src/ast/loader.rs
|
||
|
Comment on lines
+3
to
+6
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 The PR description's robobun evidence block is stale: it uses Extended reasoning...What the issue isCommit f79e101 — the tip of this PR — deletes Where the description is now inconsistent with what shipsFour places in the PR body/timeline reference the deleted file:
Step-by-step proof
Why this mattersREVIEW.md states "Every deletion needs a stated reason or replacement", and CLAUDE.md #11 says "NEVER overstate what you got done or what actually works in commits, PRs". The description currently overstates what ships: it presents test evidence for a test that isn't in the final diff. This is not a code defect — the 9 dead-code deletions themselves are correct, ImpactNothing breaks at runtime if merged as-is. The risk is purely process/review: a maintainer skimming the evidence block would approve believing a regression guard exists against these symbols reappearing, when the PR actually relies on the pre-existing How to fixEither:
Anchoring this comment on |
||
|
|
||
| use enum_map::Enum; | ||
|
|
||
|
|
@@ -64,20 +64,6 @@ | |
| Text = 13, Bunsh = 14, Sqlite = 15, SqliteEmbedded = 16, Html = 17, | ||
| ); | ||
|
|
||
| /// `Loader.Optional` — `enum(u8) { none = 254, _ }` niche-packed optional. | ||
| #[repr(transparent)] | ||
| #[derive(Copy, Clone, Eq, PartialEq, Debug)] | ||
| pub struct LoaderOptional(pub(crate) u8); | ||
|
|
||
| impl LoaderOptional { | ||
| pub const NONE: LoaderOptional = LoaderOptional(254); | ||
|
|
||
| #[inline] | ||
| pub const fn from_loader(l: Loader) -> LoaderOptional { | ||
| LoaderOptional(l as u8) | ||
| } | ||
| } | ||
|
|
||
| // E0658: inherent assoc types are nightly-only; lifted to module scope. | ||
| pub type LoaderHashTable = bun_collections::StringArrayHashMap<Loader>; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.