Skip to content

rustc: Forbid plugin_registrar in only rlib form #15565

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

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Member

If a plugin registrar is available, the library must be found in dylib form, not
just in rlib form.

Closes #15475

@@ -473,6 +473,13 @@ impl<'a> PluginMetadataReader<'a> {
let registrar = decoder::get_plugin_registrar_fn(library.metadata.as_slice()).map(|id| {
decoder::get_symbol(library.metadata.as_slice(), id)
});
if library.dylib.is_none() && registrar.is_some() {
let message = format!("crate `{}` found in rlib format but must \
Copy link
Member

Choose a reason for hiding this comment

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

"plugin crate ..."

Copy link
Member

Choose a reason for hiding this comment

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

(Or maybe even "plugin crate {} only found in ...".)

@huonw
Copy link
Member

huonw commented Jul 10, 2014

r=me with a tweaked error message.


#![feature(phase)]
#[phase(plugin)] extern crate rlib_crate_test;
//~^ ERROR: crate `rlib_crate_test` found in rlib format but must be available in the dylib format
Copy link
Member

Choose a reason for hiding this comment

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

This probably needs adjusting for the new message...

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm always sure to remind myself when I read comments about tweaking messages to go update the tests, and then I also always manage to forget by the time I git push...

If a plugin registrar is available, the library must be found in dylib form, not
just in rlib form.

Closes rust-lang#15475
bors added a commit that referenced this pull request Jul 11, 2014
If a plugin registrar is available, the library must be found in dylib form, not
just in rlib form.

Closes #15475
@bors bors closed this Jul 11, 2014
@alexcrichton alexcrichton deleted the issue-15475 branch July 11, 2014 21:46
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 18, 2023
Implement `write_via_move` intrinsic for mir-eval

Required for getting `write!`ing to work again. we fail with an odd type mimsatch eval error after this change though
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.

Plugin silently ignored if only found as an rlib
3 participants