Comments (3)
Thank you!
I havn't really looked at the 2018 edition concept yet, but yes, ideally ructe should recognize if the project it is a build dependency of has enabled the 2018 edition, and if so generate the new-style use lines. I don't know if that is possible.
If it can't be done "automagically", it could be either a parameter set in the build script or a feature defined on the dependency. I guess a future would be the best way then?
I'll look into it.
from ructe.
I have asked for an environment variable to use at https://users.rust-lang.org/t/detect-edition-2018-from-cargo-build-rs/21134 .
Failing that, I now think it would be better to actually look for an edition
setting in $CARGO_MANIFEST_DIR/Cargo.toml
than to require a feature flag or a call parameter in build.rs itself.
from ructe.
It seems that it is possible to formulate the use lines in such a way that they are compatible with both edition 2015 and edition 2018, so my current hope is that detecting edition 2018 should not be necessary. There are still some details that fails, but I hope to get back to it in a few hours.
from ructe.
Related Issues (20)
- [Feature Proposal] Utilize macros HOT 1
- match enum struct variant defect? HOT 2
- add support for trillium HOT 1
- Lifetime support HOT 2
- dyn Write support removed? HOT 5
- Does using include_bytes! for static files impact incremental compile times? HOT 4
- Ructe produces a failing doc-test HOT 2
- directly output string instead of a function HOT 1
- Consider adding custom elements. HOT 3
- Wrong documentation in for calling other templates HOT 1
- Types with lifetimes don't parse as arguments to templates HOT 1
- Add tide support HOT 6
- Allow `else if` conditions HOT 5
- static file cant start with a number HOT 1
- How do I call async functions from templates? HOT 1
- Join Vector<Html<T>> with separator HOT 3
- Build status on commits HOT 1
- Passing values multiple levels when calling other templates HOT 2
- Improved support for inline script/styling
- Using static files without hash suffixes? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ructe.