Files
OrcaSlicer/tests
SoftFever 30ceeee18d Fix the Newer 3MF Warning for Alpha and Beta Projects in Nightlies (#16791)
# Description
<!--
> Please provide a summary of the changes made in this PR. Include
details such as:
  > * What issue does this PR address or fix?
  > * What new features or enhancements does this PR introduce?
> * Are there any breaking changes or dependencies that need to be
considered?
-->

Fixes #16771. Opening a project saved by 2.5.0-alpha in a nightly shows
"The 3MF file version 2.5.0-alpha is newer than OrcaSlicer's version
2.5.0-dev, found the following unrecognized keys:", followed by an empty
list.

Three things cause this:

- `semver.c` ranks `dev` below every other prerelease. Nightlies stay on
`x.y.z-dev` after the alpha and beta are tagged on the release branch,
so every alpha or beta project looked newer than the nightly opening it.
- `silent_mode` was retired: `handle_legacy` drops it on load, and
nothing can set it. It was still defined, though, so it was written into
every project. Every project then reported it as an unrecognized key on
load, and every project from a newer version took the "unrecognized
keys" branch of the warning. For the project in the issue it is the only
key reported.
- The warning never printed the keys it found, so the list was blank.

## Changes

- Rank `dev` above the other prereleases of the same version and below
the release: alpha < beta < rc < dev < release. This also changes two
other places that compare against the app's version:
- A project saved by a `x.y.z-dev` nightly now counts as newer when
opened in that version's alpha or beta.
- The update check, with prereleases enabled, no longer offers that
version's alpha or beta to nightly users. It still offers the release.
- Remove the `silent_mode` option, so projects no longer save it, along
with the code that only read it: the Normal/Silent columns on the
printer's Motion ability page, the Normal/Silent label in the
unsaved-changes dialog, and the switch that enabled the stealth time
estimator. Since the value was always false, none of these ran. The key
stays in the obsolete set, so older projects that contain it still load.
- List the unrecognized keys in the newer-version warning. The UI
strings are unchanged, so existing translations stay valid.

Projects saved before this change still carry `silent_mode`, so the
warning lists it when one of them is newer than the running version.

# Screenshots/Recordings/Graphs

<!--
> Please attach relevant screenshots to showcase the UI changes.
> Please attach images that can help explain the changes.
-->
Before:
<img width="860" height="200" alt="before"
src="https://github.com/user-attachments/assets/5d067ae1-5cfb-40b4-8973-3ac10cf2aeb9"
/>

After:
<img width="860" height="200" alt="after"
src="https://github.com/user-attachments/assets/2ef2401e-e869-4ae8-84f6-8730494c13c0"
/>

## Tests

<!--
> Please describe the tests that you have conducted to verify the
changes made in this PR.
-->

- New `[Semver]` cases: dev ranks above alpha, beta and rc and below the
release of its version; two dev builds compare equal. They fail without
the `semver.c` change.
- New `[Config]` case: a full config has no `silent_mode`, and loading
one that has it drops it and reports it as unrecognized.
- On Linux, loaded the project from the issue in a `2.5.0-dev` build.
Before: the warning with an empty list. After: no warning. The same
project relabelled as 2.5.0 and given an unknown key shows the warning
listing that key and `silent_mode`.
- Re-saved the project from the CLI: `silent_mode` is no longer in
`project_settings.config`.
- Sliced the project before and after: identical moves and time
estimates; only the settings comments differ.
- `tests/libslic3r` and `tests/fff_print` pass on Linux. The STEP case
"A cone with a slightly tilted seam imports as a closed mesh" fails
locally on main too. The profile tool tests pass.

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
2026-10-23 18:47:11 +08:00
..
2025-12-08 22:42:11 +08:00

OrcaSlicer tests

Building, running and writing tests is documented on the wiki, under How to Test.

Two files here rather than there, because coding agents only read what is in the repository:

  • AGENTS.md is the same guidance in short form, and is what an agent working under tests/ picks up.
  • CATCH2.md is the Catch2 reference, including the mistakes that break a test at runtime.