Closed escritorio-gustavo closed 8 months ago
This is so annoying, docs.rs passes on my computer, but not on ci
That's weird, changing the order of the tests changed which one failed
I don't quite understand what's going on, but it seems like TS_RS_EXPORT_DIR
is not respected.
in export_type
, we call output_path
, but that doen't take TS_RS_EXPORT_DIr
into account at all.
Running TS_RS_EXPORT_DIR=./custom cargo test -- export_bindings
still puts everything in tests-out
I finished moving std::env::var
outside of the macro. The only downside to this is that T::EXPORT_TO
doesn't actually correspond to the exported path anymore, due to the lack of TS_RS_EXPORT_DIR
, but this should reduce the amount of compilation going on in the user's machine
I could add a method that returns the proper path to remedy this
The reason I was thinking about adding it to TS
is because of the tests that read the exported file, all of them have a bunch of weird stuff to handle TS_RS_EXPORT_DIR
Yeah, that's a good point. If you think it makes sense, go for it!
I agree that the function that returns the path should never be overwritten. Maybe a pub fn
would be better than a new TS
method then?
Making output_path
public would probably do the trick
As discussed in #245, when using both
TS_RS_EXPORT_DIR
and#[ts(export_to = "...")]
, theexport_to
path should be relative toTS_RS_EXPORT_DIR
instead of the project'sCargo.toml