Skip to content

Conversation

lynzrand
Copy link
Collaborator

Fix discover accidentally descending into another module.

Closes #1095. Atop #1096

@semanticdiff-com
Copy link

semanticdiff-com bot commented Oct 17, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/moonbuild-rupes-recta/src/discover.rs  90% smaller

@peter-jerry-ye-code-review
Copy link

Critical bug fix: reordered checks to prevent descending into other modules

Category
Correctness
Code Snippet
Lines 143-164 in discover.rs: Moved the module check before the package check
Recommendation
The current implementation is correct. The module check should happen before the package check to prevent accidentally discovering packages in other modules.
Reasoning
This fixes the core issue described in the PR. By checking for MOON_MOD_JSON before MOON_PKG_JSON, the discovery process correctly avoids descending into other modules, which was the root cause of issue #1095.

Deprecated flag properly marked with warning and hidden from help

Category
Maintainability
Code Snippet
Lines 57-59 and 77-79 in info.rs: Added deprecation comment and warning
Recommendation
Consider setting a specific timeline for removal and adding it to the warning message, e.g., 'will be removed in version X.Y'
Reasoning
The deprecation is handled well with both hiding the flag from help and warning users, but a specific removal timeline would help users plan migration better.

Documentation updated to reflect deprecated flag removal

Category
Maintainability
Code Snippet
Lines 321 in commands.md: Removed --no-alias from documentation
Recommendation
Current implementation is good - removing deprecated options from documentation prevents new users from adopting deprecated features.
Reasoning
Consistent with the deprecation strategy, removing the flag from documentation while keeping the warning for existing users is the right approach.

@lynzrand lynzrand force-pushed the rupes-recta/fix-discover branch from f7d2d71 to 52e2010 Compare October 20, 2025 03:27
@lynzrand lynzrand enabled auto-merge October 20, 2025 03:28
@lynzrand lynzrand merged commit 855a5e1 into main Oct 20, 2025
12 checks passed
@lynzrand lynzrand deleted the rupes-recta/fix-discover branch October 20, 2025 03:43
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.

Recursive project walking behaves incorrect

1 participant