Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix 1.10 #736

Merged
merged 3 commits into from
Apr 16, 2024
Merged

Matrix 1.10 #736

merged 3 commits into from
Apr 16, 2024

Conversation

KitsuneRal
Copy link
Member

@KitsuneRal KitsuneRal commented Apr 13, 2024

The Quotient soft fork of Matrix spec has been too hastily upgraded to Matrix 1.10 that introduced local $ref objects in API descriptions, which were not supported by GTAD. It turned out to be relatively straightforward to add this support on GTAD side, so here it goes. Not many significant changes, actually:

  • Using a snapshot of to-be-released GTAD 0.11
  • Identity services stuff is inlined, one less generated folder (I don't think anybody used it ever?)
  • A bit of cleanup in Mustache partials
  • Matrix 1.10 renamed ChildRoomsChunk to SpaceHieararchyRoomsChunk - if you used it (the name; the structure remains the same) in your code, sorry, the thing will break, generated CS API files are not covered by API/ABI portability guarantees

Closes #731.

The refactoring also separates model definition into `define_models`
partial although it's only used in one place, for now. Further on it
will also be used to define common data structures for a given API
description file, in order to support local $ref objects.

Also: add files with partials to CMakeLists.txt
1. GTAD 0.11 will stop recognising title overrides for $ref objects
   (these now should apply to schemas instead) and splits out $ref
   configuration to the separate `references` section.
2. Matrix 1.10 starts using local $ref objects, which translate to
   common structure definitions on the top level for each API
   description, so operation.h.mustache provisions for them now.
3. Parts of the identity server API are now inlined into respective
   derived structures within client-server API, so the whole identity/
   tree (with its 2 files) will no more be necessary.
4. `{{#camelCase}}` lambda is no more, {{#titleCase}} replaces it.
Files generated from the identity service spec are gone: these were only
used from a single place, so no real need to have them separate.
Eliminates the whole identity/ directory along the way.
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
8.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@KitsuneRal KitsuneRal requested a review from TobiasFella April 13, 2024 16:42
@TobiasFella
Copy link
Member

generated CS API files are not covered by API/ABI portability guarantees

Do we have that written down somewhere? I'd like to point distros at it, when necessary

@TobiasFella
Copy link
Member

I'm afraid we are using ChildRoomsChunk by name...

Could we delay that specific change until 0.9?

@KitsuneRal
Copy link
Member Author

generated CS API files are not covered by API/ABI portability guarantees

Do we have that written down somewhere? I'd like to point distros at it, when necessary

Errr, looks like we don't. I was under impression that I've put some lines in README.md or at least CONTRIBUTING.md but I don't seem to find that. Anyway, if you use it, I think I can do the reverse-rename just by altering GTAD configuration; will follow up in this PR.

@KitsuneRal KitsuneRal force-pushed the kitsune/matrix-1.10 branch from 63d2a26 to e72eedc Compare April 13, 2024 18:35
@KitsuneRal
Copy link
Member Author

ChildRoomsChunk is back; the *ValidationData piece still alters the API, formally; but I believe it's not in use so far. But the fact that API/ABI guarantees are implied for these files rather complicates matters. I think I can still roll out a backwards-compatible version of this but it's a bummer.

@KitsuneRal
Copy link
Member Author

Heh, apparently I cannot; some changes involve adding arguments (even though with default values) to functions, and that constitutes ABI breakage. Guess I'll have to pin an older version of Matrix spec for libQuotient 0.8.x instead; or just entirely disable automatic API generation in the current stable version.

@KitsuneRal KitsuneRal force-pushed the kitsune/matrix-1.10 branch from e72eedc to 5992227 Compare April 15, 2024 17:19
@KitsuneRal
Copy link
Member Author

Given that we're not pushing it for 0.8 any more, SpaceHierarchyRoomsChunk is back here again.

@KitsuneRal KitsuneRal merged commit 0bced3e into dev Apr 16, 2024
34 of 35 checks passed
@KitsuneRal KitsuneRal deleted the kitsune/matrix-1.10 branch April 16, 2024 08:38
@KitsuneRal KitsuneRal added the enhancement A feature or change request for the library label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or change request for the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to Matrix 1.10
2 participants