Question for those who use @rustlang: is it acceptable to do network requests in a proc macro to fetch non http://crates.io dependencies needed for code gen? How would you do this otherwise? http://build.rs and store in target folder?
-
-
Replying to @ryan_levick @rustlang
What kind of deps are you looking to import? Knowing more details about the workflow you want would be helpful to help think of a better approach.
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts @rustlang
It’s metadata files (windows specific stuff). We read them to know which code to generate
1 reply 0 retweets 1 like -
Replying to @ryan_levick @rustlang
Yeah def the most common / successful I've seen people include these is to have them live in a dedicated git submodule. That way network all requests are done during git checkout, and linking never needs to hit the network.
1 reply 0 retweets 2 likes -
Replying to @yoshuawuyts @rustlang
This assumes it's stored as git which these dependencies are not, but I get the point. I think we should have a http://build.rs step for bringing them in locally to a well known place, and then reading from them in proc-macro
1 reply 0 retweets 4 likes -
Replying to @ryan_levick @rustlang
I guess I'm suggesting to *make* them a git dep. As others have pointed out network access may be restricted during build, and don't benefit from e.g. network retry mechanisms CI providers ensure for git.
1 reply 0 retweets 2 likes -
Replying to @yoshuawuyts @rustlang
Unfortunately this is not under my control at least in the short run. They're packaged as nuget packages...
2 replies 0 retweets 1 like
*ahh* okay! Yep nope what you're saying makes perfect sense
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.