Repository navigation
feat(rust): detection-only build (default 'file' feature) + infer 0.19 - #90
Merged
Merged
Conversation
…er 0.19 The I/O File type (and its AWS SDK, reqwest and tokio deps) moves behind a default-on 'file' feature, so default-features = false leaves only detection, content_disposition and the validation errors. Lets a service's core library sniff bytes it already holds without pulling the AWS SDK in: the Smoo AI media pipeline had two hand-written infer sniffers that drifted apart (SMOODEV-3648). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: a0c9cff The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…3fw-v26w-5fgq TreatWarningsAsErrors turns the NU1902 advisory into a restore failure, so dotnet format/build failed on every PR. Build-time only (PrivateAssets=All). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In Rust,
smooai-filealways pulled inaws-sdk-s3,aws-config,reqwestandtokio/full, so a service that only needs to sniff bytes it already holds couldn't use it cheaply. As a result the Smoo AI monorepo's media pipeline hand-rolled two separateinfersniffers (api-prime and temporal-worker), and they drifted apart. One normalizesaudio/x-m4atoaudio/mp4and the other doesn't, so an inbound.m4atext is rejected (SMOODEV-3648).Solution
New
filefeature, on by default, gating the I/OFiletype and its modules (file,metadata,source),FileError::Http, and every I/O dependency. Existing users see no change.default-features = falseleaves onlydetection,content_dispositionand the error types, and depends on justinfer,mime_guessandthiserror.infer0.16 → 0.19.rust:checknow also runscargo check --no-default-features --all-targets. Test files that needFileare gated on the feature. The crate-level doc example is split: a detection example runs without features, and theFileexample is only included withfile..NET: SourceLink 8.0.0 → 10.0.303. A new advisory (GHSA-23fw-v26w-5fgq) on
Microsoft.Build.Tasks.Git8.0.0, combined withTreatWarningsAsErrors, made every restore fail, sovalidatewas red on every PR (reproduced locally). Build-time only (PrivateAssets="All"). Verified withdotnet format --verify-no-changes, and all 97 .NET tests pass.Verification
cargo test(default): all suites pass.cargo test --no-default-features: 32 unit tests, 3 error-taxonomy tests and the doctest pass.cargo clippy -D warningspasses both ways;cargo fmt --checkpasses.cargo tree --no-default-features: onlyinfer,mime_guess,thiserror.🤖 Generated with Claude Code