Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Register new display encoders when loading packages. - #179

Merged
Cassandra Granade (cgranade) merged 6 commits into
masterfrom
cgranade/fallback-encoder
Jun 25, 2020
Merged

Register new display encoders when loading packages.#179
Cassandra Granade (cgranade) merged 6 commits into
masterfrom
cgranade/fallback-encoder

Conversation

@cgranade

Copy link
Copy Markdown
Contributor

This PR adds a new event handler that loads display encoders from new packages as they are loaded, allowing packages to extend the display encoder mechanism to handle types not known at IQ# compile time.

@rmshaffer Ryan Shaffer (rmshaffer) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks nice, thanks for doing this! Just a couple of small comments.

Comment thread src/Core/Core.csproj Outdated
Comment thread src/Kernel/IQSharpEngine.cs Outdated
.Select(asm => asm.Assembly.GetName())
.ToImmutableHashSet()
// Except assemblies known at compile-time as well.
.Add(typeof(StateVectorToHtmlResultEncoder).Assembly.GetName());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When #177 is merged, the AzureClient assembly will also have some display encoders in it. Just FYI to whichever one of us merges second.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good to know, thanks! Given what you said about conda breaking until #177, it probably makes sense for that one to go first and for me to catch up?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably yes, that makes sense. Hoping to be able to merge that first thing tomorrow morning.

Comment thread src/Kernel/IQSharpEngine.cs Outdated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants