Skip to content

Two tests fail on a Windows checkout: a CRLF parse in feature_walk_tests, an 8.3 TEMP path in libraries_tests #1186

Closed

Description

@CamWight

Behavior

Two tests fail on Windows, every run, for reasons that have nothing to do with what they test. Linux CI doesn't see either one.

1. solidcraft-doc feature_walk_tests::input_sketches_lists_every_variant_with_a_sketch_field: a CRLF checkout

FeatureKind::taper has a sketch field but input_sketches reports no sketch for its fixtures

The test finds the end of enum FeatureKind in document.rs with split("\n}\n") (crates/doc/src/feature_walk_tests.rs:145). Git's default on Windows (core.autocrlf=true) checks the file out with CRLF, so the text is "\r\n}\r\n" and the split never matches. The test then reads to the end of the file and takes variants of the enums after FeatureKind (Taper and others) as feature kinds.

#1103 fixed the same thing in the other test in that file, the_record_covers_every_variant, with .replace("\r\n", "\n") (line 187). This one doesn't have it yet.

2. solidcraft-engine cmd::libraries::tests::catalog_export_obeys_file_scope_in_new_file_and_overwrite_modes: an 8.3 TEMP

invalid parameters for `library.export`: C:\Users\USERNA~1\AppData\Local\Temp\solidcraft-catalog-68832-0.scope\outside\new.json: not allowed for this agent: short (8.3) names such as `PROGRA~1`

When the user folder's name doesn't fit the 8.3 form, Windows gives TEMP in its short form. The test's File::new builds its paths under std::env::temp_dir() (crates/engine/src/cmd/libraries_tests.rs:13), and the path scope refuses short names before it checks anything else. So the test sees a different refusal from the one it expects. #1055 fixed the older path-scope tests by building under solidcraft_io::vfs::temp_dir(), the temporary folder spelled with long names. This test came with #863, after #1055.

Reproduction

Windows 11, main e519fbd:

  1. cargo test -p solidcraft-doc --profile ci --lib -- --exact feature_walk_tests::input_sketches_lists_every_variant_with_a_sketch_field
    • With the CRLF checkout: FAILED, with the message above.
    • With crates/doc/src/document.rs converted to LF and nothing else changed: ok.
  2. cargo test -p solidcraft-engine --profile ci --lib -- --exact cmd::libraries::tests::catalog_export_obeys_file_scope_in_new_file_and_overwrite_modes
    • With TEMP=C:\Users\USERNA~1\AppData\Local\Temp, as Windows sets it: FAILED, with the message above.
    • With TEMP and TMP set to the long form: ok.

Nothing visible in the app.

Suggested fix

The fixes the neighbouring tests already use:

  • feature_walk_tests.rs:144: let src = include_str!("document.rs").replace("\r\n", "\n");
  • libraries_tests.rs:13: solidcraft_io::vfs::temp_dir() in place of std::env::temp_dir()

Activity

  1. CamWight commented on Oct 14, 2026

    @CamWight
    ContributorAuthor

    I'll take this one. Plan: the two one-line fixes above, in one PR, with nothing else changed.

    Checks: both tests on Windows with the CRLF checkout and the 8.3 TEMP as Windows sets it; planted faults (each fix reverted makes its test fail again); the full cargo xtask ci; and Linux through CI.

  2. selun3 commented on Oct 14, 2026

    @selun3
    Collaborator

    Fresh confirmation on 738482b, based on main 95ea05e: the full local Windows gate reports the same FeatureKind::taper failure in feature_walk_tests::input_sketches_lists_every_variant_with_a_sketch_field. The doc suite finishes 206 passed, 1 failed, 1 ignored.

    Running the actual built doc test executable in isolation reproduces it in 0.01 s (0 passed, 1 failed, 207 filtered). The worktree uses CRLF; this PR has no changes under crates/doc. This matches the source-parsing issue documented here, rather than a new material-mapping behavior claim. I see @CamWight's claim and #1211, so I will not duplicate that fix or weaken the test.

    The current full gate continues collecting the remaining results; this is not a green local CI report. #1223 remains draft and distinguishes its 50 passing L1 render tests from the broader failing Windows gate. Thank you for taking care of the portability fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions