Skip to content

chore(deps): bump directories 5 -> 6#19

Open
nedseb wants to merge 2 commits intomainfrom
feat/directories-6
Open

chore(deps): bump directories 5 -> 6#19
nedseb wants to merge 2 commits intomainfrom
feat/directories-6

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Apr 28, 2026

Summary

Second of the held-back majors from #16. After auditing our usage in src/dirs.rs, the bump is API-compatible:

  • ProjectDirs::from("cc", "steami", "daplink-easyflash") — unchanged signature.
  • .data_dir() accessor — unchanged signature.

directories 6.0.0 mostly tightened platform path resolution on Windows and macOS and dropped older Rust toolchain support. No runtime behavior change for our XDG-data layout on Linux, the path of record for the project.

Test plan

  • cargo build --release --locked green locally.
  • cargo test --release --locked green (4 tests still pass).
  • Smoke test: binary launches, Settings loaded ! printed (the dirs::get_settings_dir() round-trip works).
  • CI matrix on this PR.

Held back from #16

This is the second of two pending majors (after #18 for iced 0.14). After this lands, only sysinfo 0.31 -> 0.38 remains.

The `ProjectDirs::from(...)` API and `data_dir()` accessor we use are
unchanged across the 6.x major; the bump is a clean drop-in.

The 5 -> 6 release otherwise tightens platform-specific path resolution
(notably some Windows / macOS edges) and dropped support for older
Rust toolchains. Lockfile shrinks because directories 6 prunes a few
transitive duplicates (e.g. dirs-sys variants).

Smoke test: cargo build --release --locked / cargo test green;
binary launches, settings load.
Copilot AI review requested due to automatic review settings April 28, 2026 13:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the directories crate to the v6 major release to keep dependencies current while maintaining the existing settings/data directory resolution logic in src/dirs.rs.

Changes:

  • Bump directories dependency from 5.0.1 to 6.
  • Update Cargo.lock to directories 6.0.0 and its transitive dependency graph (dirs-sys, windows-sys, redox_users, etc.).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
Cargo.toml Bumps directories to major v6.
Cargo.lock Locks directories 6.0.0 and updates transitive dependencies accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Cargo.toml
[dependencies]
async-io = "2"
directories = "5.0.1"
directories = "6"
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

Bumping directories to v6 can change the resolved data directory on Windows/macOS (per upstream’s platform path tightening). Since CI currently only runs on Ubuntu, consider adding at least a basic Windows/macOS build/smoke test (or explicitly documenting that Linux is the only supported platform) to avoid shipping a silent settings-location change on those platforms.

Suggested change
directories = "6"
directories = "5"

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Declining the suggestion to revert to directories = "5" — the whole point of this PR is to take the major bump (one of the held-back items from #16). The Win/Mac path-resolution tightening you mention is real but is upstream's call, not something to dodge by staying on 5 forever. Cross-platform smoke test in CI is a fair separate ask, tracked-worthy if you want me to file an issue. For Linux (the only platform actually shipped today via release.yaml) the path layout under ~/.local/share/daplink-easyflash/ is unchanged.

Comment thread Cargo.toml
Comment on lines 7 to 9
async-io = "2"
directories = "5.0.1"
directories = "6"
iced = "0.13.1"
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

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

directories v6 drops support for older Rust toolchains; since the project doesn’t currently declare an MSRV (no rust-version in [package]), it may be worth adding one so users get a clear error if they build with an older compiler than your supported baseline.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in d6013c1 — added rust-version = "1.80" to [package]. Picked 1.80 to match the highest MSRV among current direct deps (iced 0.13); the upcoming iced 0.14 PR (#18) will bump it to 1.88 as part of that change.

Per Copilot review on PR #19. directories 6 dropped support for older
toolchains, so making the project's baseline explicit avoids a confusing
build error for users on an older rustc. 1.80 matches the highest MSRV
among our current direct deps (iced 0.13). Will bump when iced 0.14 lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants