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

Provide list of built-in plugins #2408

Closed
umarcor opened this issue Oct 22, 2020 · 2 comments · Fixed by #2512
Closed

Provide list of built-in plugins #2408

umarcor opened this issue Oct 22, 2020 · 2 comments · Fixed by #2512

Comments

@umarcor
Copy link
Contributor

umarcor commented Oct 22, 2020

When Yosys is built without dynamic plugin loading support, using option -m produces the following error:

ERROR: This version of yosys is built without plugin support.

However, some plugins/frontends might be built-in. For example, ghdl-yosys-plugin can be built either with Yosys or as a shared library. Using -m ghdl in the former case produces the mentioned error. That's partially misleading because ghdl commands are available. Instead, I would like to propose listing the built-in plugins. For example:

ERROR: This version of yosys includes the following plugins already: ghdl. Using plugins dynamically is not supported in this build. See reference_to_the_docs.

Ref YosysHQ/fpga-toolchain#58 #1640

Steps to reproduce the issue

/cc @edbordin

@whitequark
Copy link
Member

This is quite annoying to implement nicely because -m takes a filename and tries several permutations of it, but you're using it like it takes a plugin name. In my view, some refactoring is necessary first to clearly separate these two possible kinds of inputs. (Perhaps have one option that takes a full filename, and another that takes a plugin identifier?)

@umarcor
Copy link
Contributor Author

umarcor commented Dec 5, 2020

@whitequark I think I didn't explain myself properly. The proposal is not about discovering and reporting the list of plugins that are available as modules (external shared libraries). This is about changing the error message when option -m is used in a Yosys built without plugin support. Attempting to use that option produces an error ("This version of yosys is built without plugin support"), which does not let the user know that some plugins/modules/frontends are built-in, even though external ones cannot be used.

I believe that the feature you were referring to is #1640.

NOTE: on Windows, ghdl-yosys-plugin needs to be built-in, because yosys does not support external modules. However, the recommended approach on GNU/Linux is to use ghdl-yosys-plugin as an external module/plugin.

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

Successfully merging a pull request may close this issue.

2 participants