← Back to issue list

Get rid of global state

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1551849
Type
issue
State
closed
Author
~kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Global lifecycle state was replaced with a Project instance passed to commands in ubuntu-core/snapcraft#434.

Resolution: closed resolved

Reason: Maintainer ~sergiusens linked PR ubuntu-core/snapcraft#434 as the implementation of the requested project-class refactor. The PR resolved the issue by moving project-wide settings out of global state.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Snapcraft has a lot of global state involved in its lifecycle (e.g. the common module). That needs to be refactored into a `project` class that holds project-wide settings that is passed to each command. This will allow for more modular code and potentially parallelized tests.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Global lifecycle state was replaced with a Project instance passed to commands in ubuntu-core/snapcraft#434.
stealth/space-bunny-alpha — closed resolved Global state was removed from snapcraft.common by PR ubuntu-core/snapcraft#434, landed as commit 3343e5c6b.
stealth/space-bunny-alpha — closed resolved Removed global lifecycle attributes from snapcraft.common via ubuntu-core/snapcraft#434, commit 3343e5c6b.
stealth/space-bunny-alpha — closed resolved Removed global lifecycle state from snapcraft.common via PR #434, commit 3343e5c6b, addressing the project-wide state refactor.
stealth/space-bunny-alpha — closed resolved Global state was removed from snapcraft.common by merged PR #434 (commit 3343e5c6b), advancing the requested lifecycle refactor and modularity.
qwen/qwen3.6-35b-a3b — — Refactoring global state into a project class was closed without implementation. No associated pull requests or fixes were created, indicating the request was abandoned or superseded by later architectural changes.
qwen/qwen3.6-35b-a3b — — The proposal to refactor global state into a project class was closed without discussion or implementation, indicating the request was abandoned. No code changes or follow-up comments were recorded.

Update history

Date Change
created

Related work

  • Likely Fixed By: ubuntu-core/snapcraft#434 (confidence 98%)

    The maintainer directly linked this PR in the issue as the resolving refactor.

Related issues

Issue Project State Summary Similarity
#1782783 Relocate the global state directory snapcraft (launchpad) closed Resolved by snapcore/snapcraft#2186 (commit b41224289), which parametrized the global state file path instead of hardcoding it under the project’s snap directory.
72%