Skip to content

S1 0.4.0: a generated unit names the authored file it copies (ide.generated[].origin) - #98

Closed
Sunrisepeak wants to merge 1 commit into
mainfrom
spec/s1-generated-origin
Closed

Sunrisepeak wants to merge 1 commit into
mainfrom
spec/s1-generated-origin

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Owner

S1 §7.2 gains origin on a source entry of ide.generated:

  • It is the absolute path of the authored file that the generated unit is a transformed copy of.
  • It is one of the generator's inputs, as the step that writes the unit states it.
  • A producer does not infer it from inputs (S1-7.2-14).

A consumer treats that file as the unit's source for navigation and diagnostics. It does not treat it as a second provider of the unit's module (S1-7.2-15).

The field is additive, so this is a MINOR version of the profile (0.3.0 → 0.4.0). The schema's generated object gains the property.

The producer is mcpp-community/mcpp#1004: mcpp writes the field from a build rule's mcpp::action::origin, in mcpp-community/mcpp#1006. The specification text only; the server's reading of the field is not part of this change.

@Sunrisepeak

Copy link
Copy Markdown
Owner Author

Carried in #99, so both run on one CI: this commit is kept as it is (05b46b4 there). One commit follows it there, because validate.py failed on this branch: S1-7.2-15 had two requirements under one identifier, and S1-7.2-14/15 had no evidence. The consumer rule is now split into S1-7.2-15 (pending: issue 95's G3) and S1-7.2-16 (an origin is not a second provider; tested). Closing in favour of #99.

Sunrisepeak added a commit that referenced this pull request Nov 22, 2026
…on the maintained engine (#97), and S1 0.4.0 ide.generated origin (#99)

server 0.24.1, vscode 0.24.1: the maintained engine keeps aligned allocation under the MSVC STL, so std::align_val_t is declared (#97)

A header that uses aligned allocation as C++17 allows (Slint 1.19's vtable.h)
failed in the editor only, with "no type named 'align_val_t' in namespace 'std'",
and every module including it "did not compile". WA-CLANGD-005 gave every MSVC
STL unit -fno-aligned-allocation for llvm-project#218152 (align_val_t ambiguous in
the MSVC STL's std module in clang 23.1.0). The flag also removes
__cpp_aligned_new, and vcruntime_new.h then declares neither std::align_val_t nor
the aligned operator new/delete.

The maintained engine has carried the upstream fix (llvm-project#219151, patch
0001-UP-05) in every release, but the workaround was retired by the LLVM base
version, which 23.1.0-mcppls.<n> keeps. The register now marks it fixed in the
maintained engine (fixedInMaintained), so MSVC STL units keep aligned allocation,
as the build does. Where it still applies (an upstream 23.1.0 clangd), the
workaround also defines __cpp_aligned_new=201606L, kept for std too, so the
library declares what such headers use.

Design: .agents/docs/2026-11-23-issue-97-msvc-aligned-allocation-design.md

Also carried (was #98): S1 0.4.0, `origin` on a source entry of ide.generated
(S1-7.2-14, a producer rule, mcpp-community/mcpp#1004/#1006). Its consumer rule is
split: S1-7.2-15 (the authored file for navigation and diagnostics) is pending, issue
95's G3; S1-7.2-16 (an origin is no second provider) is issue 95's G1, tested with a
stated origin.
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.

1 participant