config: enforce the .profiles 'version' key — reject unsupported versions, add a migration hook

オープン
#151 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python

調査の方向性

Start with schema.py:211 and trace how collect_config_issues surfaces validation errors in the editor Problems panel. The issue proposes rejecting unsupported versions and a migration registry, but leaves the migration behavior and scope to decide. Done means unsupported versions produce a clear reported error and the intended migration path is defined and handled.

索引モデルが issue の本文から書いたものです。

説明

enhancement

Idea

version is parsed (schema.py:211, version: int = 1) and the starter template ships version: 1, but nothing enforces it: verified — AppConfigYaml.model_validate({'version': 999}) succeeds and parses as v1. No reader anywhere in src/ consults the field.

Suggested implementation

  1. Gate it now: a model_validator rejecting unsupported versions with a clear message — unsupported config version 999 (this build supports 1) — surfaced through collect_config_issues so the editor Problems panel shows it.
  2. Longer term: a small migration registry applied before validation, MIGRATIONS: dict[int, Callable[[dict], dict]], walking version → version+1 until current. This is what makes future config-format changes (and the #145 semantics decisions) shippable without breaking old files.

Fits the domain: ProFiles configs live on shared drives and outlive app versions.

主要言語
Python
スター
1
フォーク
1
平均マージ
4時間 46分
マージ済み PR(30日)
55

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

falbany/ProFiles のほかの issue

falbany/ProFiles の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。