Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for test build scripts #1581
Comments
This comment has been minimized.
This comment has been minimized.
|
Indeed, I was expecting to be able to put a demonstration of code-generation tool by putting a cargo project into the |
This comment has been minimized.
This comment has been minimized.
|
I think that using build scripts for code generation is relatively common, and this seems like a pretty clear-cut thing that can be added! From a high-level design perspective, there's two possible routes I think we could take:
I think (1) should be avoided because it'd probably break many existing build scripts (which aren't expected to run twice) and it also doesn't allow for dev-build-specific dependencies. Using (2) allows existing build scripts to be backwards compatible as well as adding a new This is a pretty meaty project, however, and it skirts the line of "this requires an RFC", but I'd be willing to help anyone who wishes to implement! |
This comment has been minimized.
This comment has been minimized.
briansmith
referenced this issue
Oct 27, 2015
Closed
Move compilation of test executables (inherited from BoringSSL) to the test build script. #43
gkoz
referenced this issue
Oct 27, 2015
Closed
Can't use optional dependencies in a build script #2086
jansegre
referenced this issue
Feb 24, 2016
Open
Make commands in dev-dependencies available to run #2267
alexcrichton
referenced this issue
Apr 7, 2016
Closed
cfg!(test) doesn't seem to work for build.rs #2549
This comment has been minimized.
This comment has been minimized.
alobb
commented
Mar 25, 2017
|
I'd be interested in taking a look at this, but don't have any idea where to start. |
This comment has been minimized.
This comment has been minimized.
luser
referenced this issue
Sep 5, 2017
Open
Figure out a way to not require skeptic for users of a crate using skeptic #60
carols10cents
added
A-build-scripts
Command-test
labels
Sep 10, 2017
This comment has been minimized.
This comment has been minimized.
|
Closing since this needs an RFC. |
erickt commentedMay 5, 2015
Testing code generation projects like quasi is a little difficult because I would like to use quasi to generate some test files, but I can't since the build scripts are compiled before the main project. As a work around I can add a test crate that depends on quasi, but it would be more convenient if the quasi
Cargo.tomlfile had atest-buildscript that can depend on the current project and gets run before the tests.