Skip to content

Prevent duplicate MeTTa file imports - #216

Open
Yadelew-zemene wants to merge 1 commit into
trueagi-io:mainfrom
Yadelew-zemene:fix/duplicate-import
Open

Yadelew-zemene wants to merge 1 commit into
trueagi-io:mainfrom
Yadelew-zemene:fix/duplicate-import

Conversation

@Yadelew-zemene

Copy link
Copy Markdown

Description

This PR prevents import! from loading the same MeTTa file multiple times.

When a MeTTa file is imported more than once, the file can be processed and
its definitions can be registered repeatedly. This can cause problems when
the same file is imported again, especially when the same file is referenced
using different path forms.

For example:

!(import! &self child)
!(import! &self ./child)

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.

1 participant