Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PQTest info's Source reports "memory" even though connector is saved to disk #272

Open
bgribaudo opened this issue Apr 28, 2023 · 3 comments
Assignees
Labels
answered Questions that have been answered

Comments

@bgribaudo
Copy link
Contributor

For connectors created with the SDK, the Source property output by PQTest.exe info indicates "memory" even though the connector is saved to disk.

I'm presuming that "memory" here refers to something other than the connector's physical location. Is that true, or is the fact that "memory" is output a bug?

Example:

> PQTest.exe info --extension "Test.mez" -p 

[
  {
    "Source": "Memory(Test.mez)",
    ....

Thanks,
Ben

--
Context:
Microsoft.PowerQuery.SdkTools.2.114.4

@albertli-msft
Copy link
Contributor

Hi @bgribaudo,

Thanks for using the vscode-powerquery-sdk,

True, we loaded the connector's mez file into a memory provider on purpose, otherwise it might cause resource racing problems like vsc would create fs.watcher to lock the files opened and write back if it needed while we were reading it.

True, the term memory might be misleading or unneeded.

We should consider removing it right? @mattmasson 😀

@albertli-msft albertli-msft self-assigned this Apr 28, 2023
@albertli-msft albertli-msft added the answered Questions that have been answered label Apr 28, 2023
@mattmasson
Copy link
Member

I guess this is a case of implementation details leaking out.

M extensions are loaded using "Library Providers". The Filesystem provider is used to load (and monitor) all extensions in a directory (ex. the "Custom Connectors" folder in PBI Desktop). Individual .mez files are read from disk and loaded using the Memory provider. The Source value in the introspection results includes the type of provider that was used to load the library.

We could modify the introspection query to replace "Memory" with something else, but my vote would be to leave it as-is.

@bgribaudo
Copy link
Contributor Author

Sounds good. Thanks, Matt.

Down the road, could some documentation / command help could be added explaining what that option value means so that people don't need to dig for this thread?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Questions that have been answered
Projects
None yet
Development

No branches or pull requests

3 participants