Giter Club home page Giter Club logo

Comments (4)

orta avatar orta commented on May 30, 2024

I think it could look in a few different folders for a build directory (we did that with danger-swift for example)

I'd consider it an issue, they probably hardcode those build folders so can just make a list and look there?

from packageconfig.

dalu93 avatar dalu93 commented on May 30, 2024

This wouldn’t work in case PackageConfig is included as a dependency in the Package file. So would you recommend to install PackageConfig globally using mint, for example?

from packageconfig.

dalu93 avatar dalu93 commented on May 30, 2024

On the same note, what I would expect from most of the people are the below steps:

  1. Import PackageConfig as a dependency of their executable
  2. Build the executable on top of that (and somewhere try to call getPackageConfig())
  3. Take the executable binary and move it to a different folder (ex: /usr/local/)
  4. When launching the executable, that would crash because the lib couldn't be found.

from packageconfig.

IgorMuzyka avatar IgorMuzyka commented on May 30, 2024

@dalu93 think i have an idea on how to make it work almost as you specified.

Writer.write(configuration: self)

static func write<T: PackageConfig>(configuration: T) {


I think modifying these methods to accept a list of path to search for dynamic libraries at run would suffice.
So that a library user would define search path for a dynamic library in the config as follows.

#if canImport(ExampleConfig)
import ExampleConfig

ExampleConfig(value: "example value").write(searchPaths: ["/usr/local/", ".build/debug", ])
#endif

Would try to implement when i have time. This would allow PackageConfig to also be installed system wide.

from packageconfig.

Related Issues (8)

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.