Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

#!import support in documents API - #2303

Merged
jonsequitur merged 6 commits into
dotnet:mainfrom
jonsequitur:import-support-in-documents-api
Sep 29, 2022
Merged

jonsequitur merged 6 commits into
dotnet:mainfrom
jonsequitur:import-support-in-documents-api

Conversation

@jonsequitur

Copy link
Copy Markdown
Contributor

This adds support to InteractiveDocument for reading documents linked via #!import magic commands.

@jonsequitur
jonsequitur requested review from brettfo and colombod and removed request for colombod September 29, 2022 02:05
public static async Task<InteractiveDocument> LoadInteractiveDocumentAsync(
FileInfo file,
KernelInfoCollection kernelInfos)
public static async Task<InteractiveDocument> LoadAsync(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If LoadAsync expands / resolves the imports always could this cause a notebook parsing to inline the imported notebooks as we open a ipynb / dib in vscode?

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.

It doesn't resolve them or even try to identify them until someone calls GetImportsAsync.

@jonsequitur
jonsequitur merged commit 25dfba6 into dotnet:main Sep 29, 2022
@brettfo brettfo added the enhancement New feature or request label Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants