Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Sep 16, 2025

  • Adds the possibility to dynamically upgrade objects to newer versions. It is checked that the upgraded object belongs to the newer version of the same class. The class needs to be explicitly marked as upgradeable.
  • For now, anyone can upgrade an object of an upgradeable class. In the future, there should be some authorization mechanism: only the owner (or other authorized parties) should be able to upgrade the object.

@lukaszcz lukaszcz self-assigned this Sep 16, 2025
@lukaszcz lukaszcz changed the title Object upgrade feat: object upgrade Sep 16, 2025
@lukaszcz lukaszcz force-pushed the object-upgrade branch 3 times, most recently from 43c53c2 to e8b7aa7 Compare September 19, 2025 15:13
@lukaszcz lukaszcz marked this pull request as ready for review September 19, 2025 16:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces object upgrade functionality to the AVM (Anoma Virtual Machine), allowing objects to be dynamically upgraded to newer versions of the same class. The implementation includes syntax support, program structures, message handling, and validation logic.

  • Adds upgrade syntax and program structures to support object upgrades
  • Implements upgrade validation logic ensuring objects can only be upgraded to newer versions of the same class
  • Refactors resource label handling to support multiple resource types (objects, messages)

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/Applib/Surface/Program/Syntax.lean Adds test case demonstrating upgrade syntax usage
Applib/Surface/Program/Syntax.lean Defines syntax rules and macro expansions for upgrade operations
Applib/Surface/Program.lean Adds upgrade program constructor and helper function
AVM/Program.lean Implements upgrade operations in the core AVM program structure
AVM/Object.lean Updates object resource handling to use new label system
AVM/Message/Base.lean Extracts message definitions to separate base module
AVM/Message.lean Refactors to use extracted message base
AVM/Label.lean Creates unified resource label system supporting objects, messages, and intents
AVM/Ecosystem/Data.lean Updates import to use base label module
AVM/Class/Translation/Tasks.lean Adds upgrade task translation logic
AVM/Class/Translation/Messages.lean Implements upgrade message creation
AVM/Class/Translation/Logics.lean Adds upgrade validation logic
AVM/Class/Label.lean Extends class labels with version and upgrade support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@janmasrovira janmasrovira merged commit 03cd53d into main Sep 22, 2025
1 check passed
@janmasrovira janmasrovira deleted the object-upgrade branch September 22, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants