Repository navigation
Conversation
…apshot does An open buffer under a project was analyzed under request.defaults(), so it ignored the selected profile while the project snapshot applied it. Both now compose through project_build, which runs request.compose for the check goal as `mach check` does. AnalysisRequest carries a ProjectSelection in place of a BuildRequest, the loaded project is keyed on that selection, and its request stays the composed one across analyses, so the post-analysis reset to defaults and the reconfigure on reuse are gone. A file under no manifest keeps its explicit options as standalone_build. Breaking: an open buffer's analysis now refuses a manifest whose profiles `mach check` refuses, which the default request accepted.
octalide
marked this pull request as ready for review
October 23, 2026 22:56
octalide
marked this pull request as draft
October 23, 2026 22:56
octalide
marked this pull request as ready for review
October 23, 2026 23:08
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #4834
An open buffer under a project now composes its build request through the same code as the project snapshot, so the editor has one composition of a project's request.
Plan
project_buildcomposes a project's request from its manifest and aProjectSelectionwithrequest.composefor the check goal, asmach checkdoes.snapshot_loadand the buffer path (proj_ensure) both call it.AnalysisRequest.buildbecomesselection: ProjectSelection. The loaded project is keyed on that selection (ProjKeyholds owned copies of artifact, target and profile), and its request borrows those copies. That way the request stays the composed one across analyses, and the post-analysis reset torequest.defaults()and thedriver.reconfigureon reuse are deleted.doc/mach/lang/editor.md.Target resolution is not involved. The selection's target is passed through as the snapshot already does, so
manifest.resolve_declaredis not touched.Decisions
AnalysisRequestkeepsstandalone_build(defaultrequest.defaults()) besidestandalone_target. A project's options are never taken from it. The one test that setbuild.opton a standalone buffer now setsstandalone_build.opt.profiles_checkand the selected profile's pass, skip and relax lists. So an open buffer's analysis now refuses a manifest thatmach checkrefuses, such as an unknown pass name in any profile, where the default request accepted it.Ran
b check .was clean.b test . --filter lang.editor --timeout 5mpassed 50 of 50.b fmt --check .and the committed-reference diff were also clean.