-
Notifications
You must be signed in to change notification settings - Fork 0
Adopt the Whitaker Dylint suite in the lint gate and CI #410
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2a04d00
Add ambient filesystem boundary crates for lint compliance
5d5ca80
Fix Whitaker Dylint findings across production and test code
9783099
Adopt the Whitaker Dylint suite in the lint gate and CI
46a6d2e
Deduplicate network policy and config precedence tests
32daa28
Harden the Whitaker install step
18a269b
Gate ambient_fs as a workspace member
b044d98
Deduplicate the command test config helper
3f6f1ac
Localize from_current_dir errors and simplify config fixtures
2d5da1b
Tidy file I/O and hash test diagnostics
6d4b9db
Fix developer guide module reference and comment spelling
34b29ad
Widen arb_path proptest strategy to reduce collisions
80d5852
Guard canonicalize_cycle_by against undersized cycles
cc4b76a
Close a TOCTOU window in the fetch cache size check
274a7bf
Explain the early cwd_guard drop in config override tests
790cd93
Add ambient_fs unit tests for the public probes
4e756cc
Share a tempdir fixture across the ambient_fs probe tests
e48c98f
Give the ambient_fs canonicalize and sync tests real oracles
fb19e90
Satisfy Whitaker lints in new review-response code
c2bb00e
Make define_newtype accessors opt-in to remove dead-code suppressions
0325590
Add structured tracing across the fetch cache and workspace open paths
9122604
Cap the cache read, not just the fstat size check
12a44a2
Separate ambient_fs probe commands from their assertions
3d9fe15
Distinguish missing manifest file name from non-UTF-8 paths
2521921
Log network request failures and guard the seconds invariant
559913f
Tidy test helpers, fixtures, and cleanup ordering
4d951a0
Name test_support in the no_std_fs_operations exclusion note
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| [package] | ||
| name = "ambient_fs" | ||
| version = "0.1.0" | ||
| edition = "2024" | ||
| rust-version = "1.89.0" | ||
| publish = false | ||
|
|
||
| [dependencies] | ||
| camino = "1.2.0" | ||
| walkdir = "2.5" | ||
|
|
||
| [dev-dependencies] | ||
| rstest = "0.26.1" | ||
| tempfile = "3.8.0" | ||
|
|
||
| [lints.clippy] | ||
| pedantic = { level = "warn", priority = -1 } | ||
|
|
||
| # 1. hygiene | ||
| # Unfortunately, due to an 'unused-braces' false positive with | ||
| # single line rstest fixtures, and the fact that fixtures do | ||
| # not permit 'expect' attributes, we must disable this deny. | ||
| # allow_attributes = "deny" | ||
| allow_attributes_without_reason = "deny" | ||
| blanket_clippy_restriction_lints = "deny" | ||
|
|
||
| # 2. debugging leftovers | ||
| # Disabled pending further investigation into applicability. | ||
| # dbg_macro = "deny" | ||
| # print_stdout = "deny" | ||
| # print_stderr = "deny" | ||
|
|
||
| # 3. panic-prone operations | ||
| unwrap_used = "deny" | ||
| # Expect used in tests. Discouraged in implementation code. | ||
| # expect_used = "deny" | ||
| indexing_slicing = "deny" | ||
| string_slice = "deny" | ||
| integer_division = "deny" | ||
| integer_division_remainder_used = "deny" | ||
|
|
||
| # 4. portability | ||
| host_endian_bytes = "deny" | ||
| little_endian_bytes = "deny" | ||
| big_endian_bytes = "deny" | ||
|
|
||
| # 5. nursery idiom polish | ||
| or_fun_call = "deny" | ||
| option_if_let_else = "deny" | ||
| use_self = "deny" | ||
| string_lit_as_bytes = "deny" | ||
|
|
||
| # 6. numerical foot-guns | ||
| float_arithmetic = "deny" |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Performance & Scalability | 🔵 Trivial
🧩 Analysis chain
🏁 Script executed:
Repository: leynos/netsuke
Length of output: 262
🏁 Script executed:
Repository: leynos/netsuke
Length of output: 12366
🏁 Script executed:
Repository: leynos/netsuke
Length of output: 4919
🌐 Web query:
whitaker-installer install output location DYLINT_LIBRARY_PATH ~/.local/bin cache installer💡 Result:
The whitaker-installer is a tool used to install, stage, and manage Dylint lint libraries [1][2][3]. Install Location and Staging: The installer manages the build and staging of lint libraries. It generates wrapper scripts (e.g.,
whitaker,whitaker-ls) to simplify the interaction with Dylint [1][2]. The installer is designed to stage these libraries in a designated directory. After installation, you are instructed to set the DYLINT_LIBRARY_PATH environment variable to this staged directory so thatcargo dylintcan locate and load the installed libraries [1][2]. DYLINT_LIBRARY_PATH: Dylint uses the DYLINT_LIBRARY_PATH environment variable to discover dynamic libraries containing lints [4][5]. When this variable is set, Dylint treats it as a colon-separated list of paths and searches them for files matching its required naming format [4][5]. The whitaker-installer effectively automates the management of this path by creating wrappers that handle the path configuration for you [1][2]. Regarding ~/.local/bin: While ~/.local/bin is a common location for user-installed binaries (like the wrapper scripts generated by the installer), the DYLINT_LIBRARY_PATH should point to the directory where the actual lint libraries (compiled dynamic library files) are staged, not necessarily where the binary scripts reside [1][4]. In summary, you should use the path provided by the whitaker-installer (or its generated shell configuration snippets) for DYLINT_LIBRARY_PATH, ensuring it points to the location of the staged lint artifacts [1][2].Citations:
🌐 Web query:
whitaker-installer docs output directory wrapper scripts DYLINT_LIBRARY_PATH install location cacheable artefacts💡 Result:
The whitaker-installer is a tool designed to simplify the installation and management of Dylint lint libraries by automating the building, linking, and staging of these libraries [1][2]. Wrapper Scripts The installer generates two primary wrapper scripts to simplify usage [3][4]: - whitaker: This script automatically invokes cargo dylint and sets the necessary DYLINT_LIBRARY_PATH to the directory where the Whitaker lint libraries have been staged [3][1][5]. - whitaker-ls: This script lists the installed Whitaker suite libraries available at the staged path [3][5]. DYLINT_LIBRARY_PATH and Install Location The DYLINT_LIBRARY_PATH environment variable is used by Dylint to locate lint libraries [6][7]. When using the whitaker-installer, it clones the Whitaker repository to a platform-specific data directory, builds the libraries, and stages them [1]. The installer configures this staged directory as the DYLINT_LIBRARY_PATH [3][4]. Users can bypass the automatic generation of these wrappers by using the --skip-wrapper flag, which instead prints the required DYLINT_LIBRARY_PATH configuration instructions [1]. Cacheable Artefacts The whitaker-installer manages the build and staging pipeline, which includes the handling of prebuilt artefacts [2]. While the installer orchestrates the download, verification, and staging of these artefacts, it relies on Dylint's underlying mechanics—such as workspace metadata or path-based resolution—to manage how those libraries are eventually consumed by the Dylint tool [6][8][9]. The installer's internal architecture includes modules for prebuilt artefact orchestration and canonical destination path resolution to ensure consistency across environments [2].
Citations:
🌐 Web query:
docs.rs whitaker-installer default install paths staged libraries wrapper scripts ~/.local/bin platform-specific data directory💡 Result:
The whitaker-installer crate is a tool designed to build, link, and stage Dylint lint libraries for local use in Rust projects [1][2]. According to the documentation on docs.rs, the installer handles various system-level tasks, including directory resolution and wrapper script generation [3][4]. While the exact absolute file paths are managed dynamically by the installer's internal logic, the following details are confirmed by the crate's technical design: - Staged Libraries: The installer manages the build and staging of lint libraries to a centralized directory to avoid redundant rebuilds during cargo dylint invocations [1][2]. The crate includes specific modules for file staging (stager) and platform-specific naming conventions [3][4]. - Wrapper Scripts: The installer automatically generates wrapper scripts to simplify the invocation of Dylint with the staged libraries [3][4]. Notably, it provides the whitaker command, which runs cargo dylint with the correct library path, and whitaker-ls to list installed libraries [1]. - Platform-Specific Paths: The installer utilizes an internal dirs module specifically for directory resolution and abstraction of platform-specific paths [3][4]. This ensures that data directories and binary locations conform to standard platform conventions, rather than being hardcoded to a single location like ~/.local/bin across all systems [3][4]. Users are generally instructed to set the DYLINT_LIBRARY_PATH environment variable to the directory containing the staged libraries after the installation process completes [1][2]. For further details on specific path configuration or architecture, the project's User's Guide and Design Document are available in the main GitHub repository [5].
Citations:
🏁 Script executed:
Repository: leynos/netsuke
Length of output: 173
Cache Whitaker’s staged artefacts too. Cache the generated
whitaker/whitaker-lswrappers and staged libraries, not justwhitaker-installerandcargo-binstall, so the stable job does not redo the Whitaker setup on every run.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai Has this now been resolved in the latest commit?
Use codegraph analysis to determine your answer.
If this comment is now resolved, please mark it as such using the API. Otherwise, please provide an AI agent prompt for the remaining work to be done to address this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leynos, checked the current state of.github/workflows/ci.ymlagainst this comment. The "Cache Whitaker installer" step (Lines 46–53) still only caches~/.cargo/bin/whitaker-installerand~/.cache/cargo-binstall. There is no path for the staged Whitaker libraries or the generatedwhitaker/whitaker-lswrapper scripts. This finding remains unresolved — the stable leg still rebuilds and stages the Whitaker artefacts on every run, even when the installer binary itself is cached.I won't mark this as resolved. Here's the agent prompt for the remaining work:
🧠 Learnings used