Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gnome-builder gnome-builder
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 534
    • Issues 534
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gnome-buildergnome-builder
  • Merge requests
  • !345

session: Make IdeSession handle plumbing so addins only handle content

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Vanadiae requested to merge Vanadiae/gnome-builder:ide_session_easier_api into master Jan 23, 2021
  • Overview 15
  • Commits 2
  • Pipelines 5
  • Changes 12

See commit message for details.


I'm quite pleased as of how it went, both API wise and code-wise.

Things that don't work: - it seems that Builder loops forever when closing a project (which it didn't before) in a poll() (as of gdb), but the callstack with the debugger doesn't show super useful information here :/

TODO once the current code is reviewed/fixed:

  • handle migration of the session.gvariant from the previous format (which is an a{sv} where the key of the {sv} is GbpEditorSessionAddin and where v is an a(siiiv) where iii are the frame column/row/depth)
  • cleanup all FIXMEs
  • add some documentation under doc/help for the IdeSessionAddin. I wonder though if it makes sense, since there's no doc for adding an IdePage either (but it could still be useful for existing IdePage types maybe?) Well it seems there's already plugins/session.rst so I'll edit this one to reflect the new API.
  • find out why when Builder crashes the session is saved without any elements (at least, it did that with the previous code, but I didn't reproduce a crash yet to know if it's still the case).
  • going with the previous item, find out when to occasionnally save the state to disk to avoid loosing the latest session state, as in you start with session state A (just after opening back the project), do some work and open some pages (state B), then crash. Here the session state stays to A, not B, where it would be better to at least have the session saved some minutes before the crash so not all recent opened pages are closed.

NOTE WHEN TESTING: don't try it in a project you work on, but create a dedicated testing project (or at least a folder where it doesn't matter loosing the session state), because the saved session format isn't compatible between both versions (as in this MR's builder will erase the previous state so you won't be able to have your session back with the normal Builder, at least until a migration is done).

Edited Jul 03, 2021 by Vanadiae
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: ide_session_easier_api