Skip to content

Release libR-sys to crates.io #66

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
clauswilke opened this issue Jul 18, 2021 · 18 comments
Closed

Release libR-sys to crates.io #66

clauswilke opened this issue Jul 18, 2021 · 18 comments

Comments

@clauswilke
Copy link
Member

We should make a new release to crates.io. Anything that needs to be addressed first? Maybe #31?

@yutannihilation Do you want to handle the release? I can add you as an owner on crates.io.

cc @Ilia-Kosenkov

@Ilia-Kosenkov
Copy link
Member

I experimented with a script that sets up everything needed for libR-sys compilation on a clean Windows 10 system, so I have now a better understanding of what needs to be done.

I can address #31 within the next day or so if it is ok.

@clauswilke
Copy link
Member Author

Super, thanks!

@yutannihilation
Copy link
Contributor

Sure, I have no experience of publishing a crate, but I think I can handle the release. #67 is nice to have, but not a blocker issue.

Thanks @Ilia-Kosenkov for addressing #31!

@andy-thomason
Copy link
Contributor

We should write up a "how to" in the README.

You can do a dry run at publishing the crate to find errors before committing.

We use the workspace to publish all extendr crates together on the whole. The version
numbers are usually synced.

@clauswilke
Copy link
Member Author

Any new headers to add before the release?

@andy-thomason has suggested Altrep.h: extendr/extendr#231 (comment)

I also think R_ext/GraphicsEngine.h would be useful.

@Ilia-Kosenkov
Copy link
Member

https://github.com/Ilia-Kosenkov/libR-sys/tree/readme-windows
Here is my progress so far. Found an issue with the i686 binding generation on a clean system - I am missing some dependency, will resolve it soon.

@clauswilke
Copy link
Member Author

@Ilia-Kosenkov You can probably simplify. I don't think we need to explain to people how to install Visual Studio.

Also, please pay attention to the structure of subsections. The following sentence is part of the Windows subsection but seems to be meant more generally.

Once R and rust are configured, the library can be easily built:

There are a few cases like this.

Finally, I don't think we need --test-threads=1 anymore. Do we need -- --nocapture?

@clauswilke
Copy link
Member Author

I just tried. cargo test is all that is needed, as far as I can tell.

clauswilke ~/github/libR-sys> cargo test
   Compiling libR-sys v0.2.0 (/Users/clauswilke/github/libR-sys)
    Finished test [unoptimized + debuginfo] target(s) in 3.10s
     Running target/debug/deps/libR_sys-b8d4b2aca00e72cd

running 24 tests
test bindgen_test_layout_R_CMethodDef ... ok
test bindgen_test_layout_R_CallMethodDef ... ok
test bindgen_test_layout_R_outpstream_st ... ok
test bindgen_test_layout_Rcomplex ... ok
test bindgen_test_layout___darwin_pthread_handler_rec ... ok
test bindgen_test_layout_R_inpstream_st ... ok
test bindgen_test_layout___double2 ... ok
test bindgen_test_layout___float2 ... ok
test bindgen_test_layout___mbstate_t ... ok
test bindgen_test_layout___sFILE ... ok
test bindgen_test_layout___sbuf ... ok
test bindgen_test_layout___va_list_tag ... ok
test bindgen_test_layout__opaque_pthread_attr_t ... ok
test bindgen_test_layout__opaque_pthread_cond_t ... ok
test bindgen_test_layout__opaque_pthread_condattr_t ... ok
test bindgen_test_layout__opaque_pthread_mutex_t ... ok
test bindgen_test_layout__opaque_pthread_mutexattr_t ... ok
test bindgen_test_layout__opaque_pthread_once_t ... ok
test bindgen_test_layout__opaque_pthread_rwlock_t ... ok
test bindgen_test_layout__opaque_pthread_rwlockattr_t ... ok
test bindgen_test_layout__opaque_pthread_t ... ok
test bindgen_test_layout_exception ... ok
test bindgen_test_layout_structRstart ... ok
[1] 1
test tests::test_eval ... ok

test result: ok. 24 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests libR-sys

running 1 test
test src/lib.rs - (line 18) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

@Ilia-Kosenkov
Copy link
Member

Ilia-Kosenkov commented Jul 20, 2021

@clauswilke, I missed these comments, I will fix it in PR in the morning (it's late night where I am).

Also, I suggest to leave Build Tools installation at least under a spoiler, because Rust surprisingly just gives a generic "Install one of the build tools", but there are plenty of workflows and Rust only needs few, and it may be confusing. This step can save gigabytes of downloading and installation for inexperienced developers, especially because we target R developers switching to Rust in their packages, who potentially have never worked with Microsoft stack before.

I see a lot of questions from rust beginners on SO not being able to compile hello world because of missing build tools or "linker.exe".

@clauswilke
Copy link
Member Author

Ok. Just make sure it's clearly structured and not too confusing. It may help to bring Linux and OS X first, since those are simpler. Basically, you'd write:

  • Here are the instructions if you have a working cargo installation.
  • If you're on Windows and don't know how to get a working cargo installation, here are the steps.

This was referenced Jul 22, 2021
@yutannihilation
Copy link
Contributor

Are there anything else that needs to be done other than some documentation tweaks I included in #73?

@clauswilke
Copy link
Member Author

Not from my side.

@Ilia-Kosenkov
Copy link
Member

We modified README two weeks ago so now it is up-to-date. Everything else looks good to me.

@yutannihilation
Copy link
Contributor

Thank you two for confirming! Then I'll merge #73 and publish to crates.io in an hour or so.

Also thanks for the owner invites, I didn't notice that, sorry...

@yutannihilation
Copy link
Contributor

On the dry run, I found this warning. But, since we have some more time until the majority of Rust users migrate to 2021 edition, and it might take a bit of time to think how to fix this, I ignore this for now.

#75

@yutannihilation
Copy link
Contributor

Published now. Thanks for your support!

https://crates.io/crates/libR-sys/0.2.2

@clauswilke
Copy link
Member Author

Super, thanks!

@andy-thomason
Copy link
Contributor

👍

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

No branches or pull requests

4 participants