GithubHelp home page GithubHelp logo

Comments (5)

aep avatar aep commented on September 14, 2024

Thanks for reporting. This is indeed not correct, but fortunately easy to fix

from zz.

aep avatar aep commented on September 14, 2024

@sternenseemann as for your actual issue with zz referencing the build dir, i believe this also needs to be addressed.

How about we just add a super long string to the default list which you can sed replace?
Odd that there's no tool for replacing strings in binaries properly.

Or could you patch the source if we added all the distro specific stuff to a single file?

from zz.

sternenseemann avatar sternenseemann commented on September 14, 2024

Since we need to generate a shell wrapper anyways for z3, patching out the CARGO_MANIFEST_DIR thing is actually enough. Also /nix/store/modules remaining in the search path is not pretty, but no problem at all since that directory will never exist.

I'm not sure which search path entry you are referring to exactly with your proposal, but I'd prefer it to patch the source rather than the binary. It doesn't need to be sed-able, I can also just vendor in a patch, but it'd be nice if that wouldn't require updating at every version bump.

from zz.

aep avatar aep commented on September 14, 2024

specifically would it help if we moved this

zz/src/lib.rs

Line 120 in 9b4bfa0

searchpaths.push(std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("modules"));

to a separate file that only contains something like

const vendor_modules = vec![std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("modules"))];

so you can replace it here

since the file will just contain vendor paths, patches will probably apply for a long time

from zz.

sternenseemann avatar sternenseemann commented on September 14, 2024

Yes that would work!

Also I'm wondering if we could make this bit a configuration option or something while we're at it:

zz/src/lib.rs

Lines 107 to 119 in 9b4bfa0

searchpaths.push(
std::env::current_exe()
.expect("self path")
.canonicalize()
.expect("self path")
.parent()
.expect("self path")
.parent()
.expect("self path")
.parent()
.expect("self path")
.join("modules"),
);

from zz.

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.