Aspid.MVVM 1.1.0#7
Merged
Merged
Conversation
added 16 commits
October 27, 2025 09:56
…And-Struct Fix Generate Generic Enum And Struct
…s-Support Add bindable properties support
9 tasks
added 4 commits
January 12, 2026 17:40
…hangedAll Add public void NotifyCanExecuteChangedAll() for ViewModel
…edAll-Generated Fix NotifyCanExecuteChanged Generated
Add Keyword for Set Methods and Refactor
Generated View `InitializeInternal`/`DeinitializeInternal` now forward the View instance and the bindable member Id (`Ids.X` const) to runtime binder helpers, so a null entry in a binders array logs the offending View/GameObject and identifier instead of an opaque message. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The BindSafely/UnbindSafely runtime overloads for single binders (`this T?`) do not accept owner/memberName params, so emitting them broke compilation for any view holding a non-collection binder field. Emit the diagnostic args only when the member resolves to a collection overload (T[], List<T>, IEnumerable<T>). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reverts the IsBinderCollection split: the runtime now exposes the same optional `owner`/`memberName` pair on single-binder overloads, so the generator can emit a single uniform call shape regardless of binder arity. Keeps the emitter trivial. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- VirtualBinderFields collects bindable VM members not yet declared as binder fields on a [View] type and BinderFieldsBody emits a `_<name> : MonoBinder[]` slot for each one. Opt out via [View(AutoBinderFields = false)] or by deriving from ScriptableObject. - Propagate inspector grouping metadata from the VM: [Header], [HeaderGroup], [HeaderGroupStart], [HeaderGroupEnd] on VM members tag the corresponding generated binder fields so the editor can render foldout groups. - Wire the collector through ViewGenerator / BinderMembersFactory / ViewData(Span) / InitializeBody / GenericInitializeView, and align Descriptions.Classes with the current Aspid.MVVM namespace for MonoBinder and AddComponentContextMenuAttribute.
…elds-And-HeaderGroup Add virtual binder fields generation with HeaderGroup support
Update Unity copy path for MVVM folder move
The Sample project pinned the pre-move Assets\Plugins\Aspid\MVVM source paths via an explicit, now-stale file list, so dotnet build failed with CS2001 (missing source files). Replace the explicit list with a recursive glob over Assets\Aspid\MVVM\Source, which is Unity-independent, so the project tracks file add/remove/rename automatically.
The Sample compiles generator output that references Unity.* (profiler markers), so it only compiles inside Unity. Drop its Build.0 entries so dotnet build/test of the solution (release CI) no longer fail on it; the project still loads in the IDE.
fix(build): repair Generators.Sample headless build after package move
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aspid.MVVM.Generatorsдля релизаAspid.MVVM 1.1.0: крупный апгрейд генератора, поддержка Bindable Properties, виртуальных полей биндеров сHeaderGroup,NotifyCanExecuteChangedAll(), ключевых слов в set-методах, более информативногоBindSafelyи крупный рефактор внутреннего кода.Added
#regionв сгенерированном коде,Add Invocation PropertyChanged).NotifyCanExecuteChangedAll()— генерируется на уровне ViewModel; обновляетCanExecuteChangedу всехRelayCommand-членов (далее починен вFix NotifyCanExecuteChanged Generated).this.в bindable-property сеттерах; починен генерируемыйconstи сами properties.BindSafely/UnbindSafely— генератор всегда эмиттитownerи bindableId(с пропуском для single-binder сценария), пополняетBinderLogконтекстом view + bindable-id.MonoBinder[]-поля + поддержкаHeaderGroup(HeaderGroupAttribute/HeaderGroupStartAttribute/HeaderGroupEndAttribute) — генератор автоматически создаёт слоты подIView<TViewModel>-членов, которых нет в декларации View. Скип дляScriptableObject-наследников. Совместная работа с runtime-HeaderGroupRouter.Aspid.Generators.Helper— общий helper-пакет (введён + обновлён).launchSettings.jsonдля отладки генератора.Refactor
BindableField,BindableCommandи связанных хелперов (см. сериюRefactorкоммитов).Extensions/-слоя (Symbols / Declarations / Writer): удалены неиспользуемые helper'ы, упрощёнSymbolExtensions.cs, мёртвый код вырезан.Directory.Build.targets— общийCopyToUnity-таргет, обновлённый путь копирования под перенос Unity-проекта вAspid.MVVM/Assets/Aspid/MVVM/.Fixed
enumиstruct(Bug/Fix-Generate-Generic-Enum-And-Struct).BindAlso— корректная привязка.Linked PRs
Test plan
dotnet build Aspid.MVVM.Generators.slnсобирается без ошибок.dotnet test Aspid.MVVM.Generators/Aspid.MVVM.Generators.Tests/— зелёные.Aspid.MVVM.Generators.dllобновляется в Unity-пакете.[Bind]на property корректно генеритINotifyPropertyChanged-логику.NotifyCanExecuteChangedAll()обновляет всеRelayCommandViewModel'а.MonoViewдляIView<TViewModel>-членов,[View(AutoBinderFields = false)]корректно отключает поведение.HeaderGroupсворачивает поля в инспекторе и не попадает в non-DEBUG/ non-UNITY_EDITORсборки.