Skip to content

Cannot load plugins without proj config #1925

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stefanv
Copy link
Collaborator

@stefanv stefanv commented Mar 19, 2025

No description provided.

`loadPlugins` sometimes get invoked before the project config is
available. In that case, it will not load the plugins, but when the
next chance comes to do so, it will take the early exit ("we already
tried to load plugins") instead of loading them.
@stefanv stefanv force-pushed the cannot-load-plugins-without-projConfig branch from f45415a to 1b15b15 Compare March 19, 2025 00:40
Copy link

changeset-bot bot commented Mar 19, 2025

⚠️ No Changeset found

Latest commit: 1b15b15

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

@agoose77
Copy link
Contributor

@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.

@stefanv
Copy link
Collaborator Author

stefanv commented Mar 19, 2025

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.

@agoose77
Copy link
Contributor

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

@stefanv
Copy link
Collaborator Author

stefanv commented Mar 20, 2025

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.

@agoose77
Copy link
Contributor

Hi @stefanv, any update on a reproducer here?

@stefanv
Copy link
Collaborator Author

stefanv commented Mar 31, 2025

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.

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