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

Make `gpu_cache` optional #17

Merged
merged 2 commits into from Feb 12, 2018

Conversation

Projects
None yet
3 participants
@lo48576
Copy link
Contributor

lo48576 commented Jun 8, 2016

I think gpu_cache module and related features should be optional, so how is it to use "feature" feature?
This change will help solve also #12, by not turning on the gpu_cache feature on Redox os.
The feature is (currently) disabled by default, but can be enabled by building with cargo build --features="gpu_cache", and gpu_cache example can run by cargo run --example=gpu_cache --features="gpu_cache".
(See http://doc.crates.io/manifest.html#the-features-section )

@lo48576 lo48576 force-pushed the lo48576:make-gpu-cache-optional branch from d5dcc4c to b443d0c Jun 8, 2016

@lo48576 lo48576 changed the title Make `gpu_cache` optional (default feature) Make `gpu_cache` optional Jun 8, 2016

@lo48576 lo48576 force-pushed the lo48576:make-gpu-cache-optional branch from b443d0c to 3783705 Jun 8, 2016

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Jun 10, 2016

https://travis-ci.org/dylanede/rusttype/builds/136678828#L184
I think CI test should be run with gpu_cache feature, by cargo test --features="gpu_cache".

extern crate arrayvec;
#[cfg(feature = "gpu_cache")]

This comment has been minimized.

@mitchmindtree

mitchmindtree Jun 10, 2016

Contributor

You might be able to remove the need for these individual cfgs by moving each extern crate * into the feature gated gpu_cache module?

@lo48576 lo48576 force-pushed the lo48576:make-gpu-cache-optional branch from 1908353 to 8f67f6f Jun 13, 2016

@jackpot51

This comment has been minimized.

Copy link
Member

jackpot51 commented Sep 14, 2017

I am requesting transfer to another maintainer, please read and comment here: https://github.com/dylanede/rusttype/issues/55

@lo48576 lo48576 force-pushed the lo48576:make-gpu-cache-optional branch from 16205dc to b2b1000 Oct 6, 2017

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Oct 6, 2017

Oops, resolved conflicts with old master...

@lo48576 lo48576 force-pushed the lo48576:make-gpu-cache-optional branch from b2b1000 to 2e6c0de Oct 6, 2017

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Oct 6, 2017

Rebased onto the current master.

I have two questions:

  • Should gpu_cache feature be default-enabled?
    • In this PR, currently default-disabled.
  • When gpu_cache feature is disabled, should gpu_cache example successfully compile and panic at runtime? Or should it fail to compile (with message by std::compile_error! macro)?
    • In this PR, currently the example compiles successfully and panics at runtime.
    • SOLVED: see the next comment.

@lo48576 lo48576 force-pushed the lo48576:make-gpu-cache-optional branch from 2e6c0de to ab4a5e3 Jan 8, 2018

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Jan 8, 2018

By specifying required_features field in Cargo.toml, now cargo prevents building gpu_cache example without gpu_cache feature.

This change will require #62 to add corresponding [[example]] explicitly in Cargo.toml.

lo48576 added some commits Oct 6, 2017

@lo48576 lo48576 force-pushed the lo48576:make-gpu-cache-optional branch from ab4a5e3 to 2586e41 Jan 8, 2018

@lo48576

This comment has been minimized.

Copy link
Contributor

lo48576 commented Jan 8, 2018

Rebased onto master (0.3.0).

@jackpot51 jackpot51 merged commit a4bf875 into redox-os:master Feb 12, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

lo48576 added a commit to lo48576/rusttype that referenced this pull request Feb 13, 2018

Add an entry for `image` example in Cargo.toml
Examples should be explicitly listed because of redox-os#17, but `image` example
added by redox-os#62 was not described in Cargo.toml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment