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

proper crate name #125

Closed
Ivshti opened this issue Nov 7, 2019 · 2 comments · Fixed by #131
Closed

proper crate name #125

Ivshti opened this issue Nov 7, 2019 · 2 comments · Fixed by #131
Assignees

Comments

@Ivshti
Copy link
Member

Ivshti commented Nov 7, 2019

currently, the derive macro fails when it's used in stremio-core itself

to solve this, we should check if the name of the currently compiled crate is stremio-core, and if so, use "crate"; else, use crate_name("stremio-core").unwrap_or_else(||...panic...),

@MartinKavik
Copy link
Collaborator

I see you already fixed it

let core_crate_name = crate_name(CORE_CRATE_ORIGINAL_NAME).unwrap_or("crate".to_owned());

So I think we can close it.


Other solutions FYI:


OT: Do we have plans to integrate a CI/CD pipeline with tests to prevent similar issues?

@Ivshti
Copy link
Member Author

Ivshti commented Nov 11, 2019

it's not fixed as far as I understand it, since crate_name may fail if stremio-core is not added as a dependency

We must be able to distinguish between not being added as a dep, and being the crate itself

re CI: good idea. just a simple travis file for a rust project should do the trick, feel free to try

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 a pull request may close this issue.

2 participants