Skip to content

Fix duplicate import encoding.#23

Merged
peterhuene merged 1 commit intomainfrom
fix-encoding
Nov 30, 2023
Merged

Fix duplicate import encoding.#23
peterhuene merged 1 commit intomainfrom
fix-encoding

Conversation

@peterhuene
Copy link
Copy Markdown
Member

This fixes a bug where a duplicate import might occur when an import with dependencies on other interfaces is encoded and then later on an import for one of those dependencies is also explicitly encoded.

It skips the import if it has already been imported and also ensures that the full interface definition is provided when encoding at the root state (i.e. for the composition itself and not an instance/component type).

As such, we don't need to process dependencies of implicit imports during resolution.

This fixes a bug where a duplicate import might occur when an import with
dependencies on other interfaces is encoded and then later on an import for one
of those dependencies is also explicitly encoded.

It skips the import if it has already been imported and also ensures that the
full interface definition is provided when encoding at the root state (i.e. for
the composition itself and not an instance/component type).

As such, we don't need to process dependencies of implicit imports during
resolution.
Copy link
Copy Markdown
Collaborator

@fibonacci1729 fibonacci1729 left a comment

Choose a reason for hiding this comment

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

Nice!

@peterhuene peterhuene merged commit 9f2fe90 into main Nov 30, 2023
@peterhuene peterhuene deleted the fix-encoding branch November 30, 2023 02:33
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.

2 participants