← Back to issue list

project loader: refactor into package

View original Github issue

Metadata

Project
snapcraft
Number
#1504
Type
pull request
State
merged
Author
kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Merged in snapcraft#1504 via commit 80630158d, creating a project-loader package and moving PartsConfig, schema validation, and loader errors into it.

Resolution: closed resolved

Reason: PR #1504 was merged as commit 80630158d. The refactor completed its package restructuring and provided groundwork for moving the grammar logic from pluginhandler.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This PR makes progress on #1492, paving the way for the grammar to be moved into the project loader instead of pluginhandler. It moves `project_loader` into its own package dedicated to loading the project. IT also moves the `PartsConfig` logic in there as well, but leaves the remote parts logic out. Also, since the schema validator was only ever used from project loader, the schema was moved into the `project_loader` package as well. Finally, it creates a base class for project-loading-related errors, and modified the current errors to inherit from that.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#1504 via commit 80630158d, creating a project-loader package and moving PartsConfig, schema validation, and loader errors into it.
stealth/space-bunny-alpha — closed resolved Merged via commit 80630158d: project_loader moved into its own snapcraft/project_loader package, relocating PartsConfig, the schema validator/schema, and a new ProjectLoaderError base class, paving the way for grammar work in #1492.
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#1504 via commit 80630158d, creating a dedicated project-loader package and moving PartsConfig, schema validation, and loader errors into it.
stealth/space-bunny-alpha — closed resolved Merged in #1504 via 80630158: project_loader became a dedicated package with PartsConfig, schema validation, and a shared error base, paving the way for grammar relocation.
qwen/qwen3.6-35b-a3b — — Merged a refactor moving the project loader into a dedicated package, relocating PartsConfig logic and the schema validator, and introducing a base error class. Modified 16 files to advance issue #1492.
qwen3.6-35b-a3b-mtp-q6 — — Merged a refactor moving the project loader, PartsConfig logic, and schema validator into a dedicated package. Introduces a base class for project-loading errors, advancing progress on issue #1492.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#1492 (confidence 100%)

    The PR explicitly identifies itself as progress toward the broader filtering work tracked by #1492.

  • Related To: snapcraft#1500 (confidence 98%)

    Follow-up PR #1500, merged as ed332f0d4, moved grammar handling into the refactored project_loader package.

Related issues

Issue Project State Summary Similarity
#1596044 Parts loader needs refactoring snapcraft (launchpad) closed Parts configuration was refactored into a dedicated recursive loader by merged PR snapcore/snapcraft#731, commit a7b22b5d3.
78%
#1500 grammar: move into project_loader snapcraft merged Merged as ed332f0d4, moving the stage-package grammar package from snapcraft/internal/pluginhandler into project_loader — a pure relocation, part of the #1492 effort to make grammar reusable across snapcraft.yaml.
72%
#731 Factor parts config into snapcraft/internal/parts.py snapcraft merged josepht's refactor moving parts config into snapcraft/internal/parts.py merged as commit a7b22b5d3, adding project_loader (renamed from s.i.yaml during review per elopio/sergiusens).
72%
#3234 project loader: refactor errors to conform to SnapcraftException snapcraft closed PR #3234 was closed unmerged after its author reported omitted files; a maintainer later requested reopening once unblocked.
71%
#1509 project_loader: process stage package grammar snapcraft merged Merged #1509 in commit 82e27706d, moving stage-package grammar processing from pluginhandler into project_loader while retaining raw YAML for state tracking.
70%