GithubHelp home page GithubHelp logo

Comments (10)

djmarcin avatar djmarcin commented on June 20, 2024 1

There is an unstable feature that would allow it to track the file, but that would mean that using it would require nightly. rust-lang/rust#99515

There is another workaround which involves assigning include_bytes! to an unused temporary but Iā€™m not sure if that defeats the point of the compression by including it in the binary again or if it gets optimized out.

I wanted to report it here in case it would be prudent to add a warning that compression should only be used with clean builds or something until this can be fixed.

from rust-embed.

pyrossh avatar pyrossh commented on June 20, 2024 1

Yeah maybe we can update the readme. Will do it thanks.

from rust-embed.

pyrossh avatar pyrossh commented on June 20, 2024 1

Ahh nice. Will update include-flate to 0.2.0 and remove the note.

from rust-embed.

osiewicz avatar osiewicz commented on June 20, 2024 1

These paths look like a concatenation of absolute and relative path; I believe include-flate 0.2 explicitly dropped support for absolute paths, so perhaps they changed the API to accept only relative paths?
SOF3/include-flate@4d79700

from rust-embed.

pyrossh avatar pyrossh commented on June 20, 2024

Do you think this can be fixed/added in the include_flate! repo? As that would help any other projects using it. I'm guessing its not going that easy though.

from rust-embed.

pyrossh avatar pyrossh commented on June 20, 2024

Done. thanks.

from rust-embed.

osiewicz avatar osiewicz commented on June 20, 2024

Hey, it looks like this issue was addressed within include_flate itself recently? SOF3/include-flate@4cf6b8e

from rust-embed.

pyrossh avatar pyrossh commented on June 20, 2024

Release v6.8.0 with the changes thanks @djmarcin @osiewicz.

from rust-embed.

pyrossh avatar pyrossh commented on June 20, 2024

Seems like it breaks the tests,

   Compiling rust-embed v6.8.0 (/Users/pyrossh/Code/rust-embed)
error: couldn't read /Users/pyrossh/Code/rust-embed//Users/pyrossh/Code/rust-embed/examples/public/images/doc.txt: No such file or directory (os error 2)
 --> tests/lib.rs:4:10
  |
4 | #[derive(RustEmbed)]
  |          ^^^^^^^^^
  |
  = note: this error originates in the macro `include_bytes` which comes from the expansion of the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read /Users/pyrossh/Code/rust-embed//Users/pyrossh/Code/rust-embed/examples/public/images/flower.jpg: No such file or directory (os error 2)
 --> tests/lib.rs:4:10
  |
4 | #[derive(RustEmbed)]
  |          ^^^^^^^^^
  |
  = note: this error originates in the macro `include_bytes` which comes from the expansion of the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read /Users/pyrossh/Code/rust-embed//Users/pyrossh/Code/rust-embed/examples/public/images/llama.png: No such file or directory (os error 2)
 --> tests/lib.rs:4:10
  |
4 | #[derive(RustEmbed)]
  |          ^^^^^^^^^
  |
  = note: this error originates in the macro `include_bytes` which comes from the expansion of the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read /Users/pyrossh/Code/rust-embed//Users/pyrossh/Code/rust-embed/examples/public/index.html: No such file or directory (os error 2)
 --> tests/lib.rs:4:10
  |
4 | #[derive(RustEmbed)]
  |          ^^^^^^^^^
  |
  = note: this error originates in the macro `include_bytes` which comes from the expansion of the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read /Users/pyrossh/Code/rust-embed//Users/pyrossh/Code/rust-embed/examples/public/main.css: No such file or directory (os error 2)
 --> tests/lib.rs:4:10
  |
4 | #[derive(RustEmbed)]
  |          ^^^^^^^^^
  |
  = note: this error originates in the macro `include_bytes` which comes from the expansion of the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

error: couldn't read /Users/pyrossh/Code/rust-embed//Users/pyrossh/Code/rust-embed/examples/public/main.js: No such file or directory (os error 2)
 --> tests/lib.rs:4:10
  |
4 | #[derive(RustEmbed)]
  |          ^^^^^^^^^
  |
  = note: this error originates in the macro `include_bytes` which comes from the expansion of the derive macro `RustEmbed` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `rust-embed` (test "lib") due to 6 previous errors

from rust-embed.

pyrossh avatar pyrossh commented on June 20, 2024

Fixed again in v6.8.1. Thanks.

from rust-embed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.