mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Cannot load plugins without proj config

Open stefanv opened this issue 8 months ago • 7 comments

stefanv avatar Mar 19 '25 00:03 stefanv

⚠️ No Changeset found

Latest commit: 1b15b1557187468ea7e421e147c39a4987952105

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Mar 19 '25 00:03 changeset-bot[bot]

@stefanv can you share the thought process behind why this PR is necessary? From a first glance, it means that loadPlugins may silently not load plugins, which is not ideal.

agoose77 avatar Mar 19 '25 09:03 agoose77

Yes, I believe there is a bug currently. When I start the myst content server, I noted that plugins are not loaded. This PR avoids the problematic usage of loadPlugins where the project config is not yet available. All subsequent attempts to load plugins then fails.

This at least makes plugins work with web page content, but it does not address another issue, which is that parts are loaded even earlier, before plugins are available.

stefanv avatar Mar 19 '25 16:03 stefanv

Can you publish a reproducer? The myst docs use plugins, and the content server loads them just fine.

agoose77 avatar Mar 20 '25 15:03 agoose77

I added the scienceicons extension to the landing-pages repo. I can share the exact repo, and log, showing that the plugin doesn't load, when I'm back at a computer.

stefanv avatar Mar 20 '25 15:03 stefanv

Hi @stefanv, any update on a reproducer here?

agoose77 avatar Mar 31 '25 11:03 agoose77

Looks like an interaction between using parts + plugin.

Try this content repo: https://github.com/stefanv/cryocloud-landing-demo/tree/no-plugin-reproducer

And then use this PR branch vs main branch of mystmd. You'll (hopefully) see that the plugins load with one, but not the other.

stefanv avatar Mar 31 '25 20:03 stefanv

Superseded by #2093

stefanv avatar Jun 11 '25 20:06 stefanv