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

force_build no longer works on non-precompiled targets since 0.5.3 #38

Closed
benhaney opened this issue Nov 5, 2022 · 2 comments · Fixed by #39
Closed

force_build no longer works on non-precompiled targets since 0.5.3 #38

benhaney opened this issue Nov 5, 2022 · 2 comments · Fixed by #39
Assignees
Labels
bug Something isn't working

Comments

@benhaney
Copy link

benhaney commented Nov 5, 2022

Hello! I recently got this bug report on my project that uses rustler_precompiled: benhaney/Jsonrs#12

Looking into it, I can reproduce the issue with rustler_precompiled 0.5.3, but not with 0.5.2 or earlier.
This seems to be caused by the new build_metadata/1 function calling target/2, which always returns an error tuple if the current target isn't on the list of supported targets, bubbling all the way back up to the __using__ macro which then throws before force_build is ever checked.

The easiest way I've found to reproduce this is to remove your current target triple from the list of targets that rustler_precompiled is configured to use, then try to force a build.

@philss
Copy link
Owner

philss commented Nov 5, 2022

Hi @benhaney!

Thanks for the report! I'm going to work on this today/tomorrow. This should be an easy fix.
Sorry about that :/

@philss philss added the bug Something isn't working label Nov 5, 2022
@philss philss self-assigned this Nov 5, 2022
philss added a commit that referenced this issue Nov 5, 2022
This is going to enable the process of building the metadata even if the
current target is not available, but "force_build" is true.

Closes #38
@philss philss closed this as completed in #39 Nov 5, 2022
philss added a commit that referenced this issue Nov 5, 2022
* Fix "force build" with unavailable target

This is going to enable the process of building the metadata even if the
current target is not available, but "force_build" is true.

Closes #38

* Rename "base_metadata" to "basic_metadata"

Also includes the base_url in the basic metadata.
@philss
Copy link
Owner

philss commented Nov 5, 2022

@benhaney please update rustler_precompiled to version 0.5.4. The issue should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants