Code Monkey home page Code Monkey logo

dep's People

Contributors

araspik avatar

Watchers

 avatar

dep's Issues

Features

Features provide a critical extension which allows modification of how targets are installed. They can be used as a generic version of Gentoo's USE flags.

Features only have one requirement - an intersect function which can be used to attempt to combine two features. Intersection fails if the features cannot be combined - for example, combining true or false with true yields true, but combining true with false fails. Note that features are a trait and can work however they want (in part because it's too complicated and rigid too add an implementation here).

Targets' dependencies (build-time and run-time) can have certain features required. During dependency map generation, the requirements on a single target from different reverse-dependencies are intersected, and if a failure occurs then the targets are effectively incompatible.

Target features cannot yet add new dependencies - that will be specified in a different issue.

Identifiers

Identifiers are used to identify one or more targets. They come in two variants:

  • Unique identifiers: Only match a single target, and is stored by that target. It should be usable within a HashMap.
  • Generic identifiers: Matches multiple unique identifiers, and is provided for by the user. It does not even require equality matching.

Both are traits to be implemented by the user.

Note that unique identifiers do not have to be Clone-able, and should be handled using Rc. This may be changed whenever specialization comes along.

Also: seeing that unique identifiers form a subset of generic identifiers, one should be able to convert unique identifiers to generic ones. This allows installation, removal, and matching code to accept generic identifiers, but be usable with unique identifiers too. This could be enhanced with specialization.

Repositories

Repositories are collections of targets. They provide a source for targets to look for dependencies, conflicts, etc. Dependency map algorithms will be written on repositories.

Repositories may work in different ways (becoming a trait), but must simply have a retriever function. This function takes a generic ID and produces some number of targets (none if the ID was not found), along with a priority for each target. Wrappers around this retriever provide different functionality - checking if an ID has matches, retrieving targets sorted by priority, etc.

Targets

Targets form the backbone of dep: Single entities that can be installed and removed. They are what everything operates around.

Targets have a few properties that need to be set up properly:

  • Unique identifier: Used to identify the target for almost everything.
  • Build-time dependencies: Dependencies which must be installed before the target can be installed. No cyclic dependencies are allowed here.
  • Run-time dependencies: Dependencies which are only required when the target is being used. Here, cyclic dependencies are allowed, but note that the run-time dependencies of a build-time dependency of a target must be installed before that target is installed, preventing cyclic dependencies in this case. However, this is useful for run-time-only dependency systems, like Arch Linux's pacman.
  • Conflicts: A list of targets by generic ID with which this target cannot be installed simultaneously. Note that conflicts are considered one-way, and so are checked for twice in the dependency map algorithm.
  • Installed object: This is a user-defined thing produced by installing the target, if the target is installed. This object is passed to targets which depend upon this one, so that they can utilize whatever it installed.
  • Core: This is an initialization of the user-defined core type. This may be modified by the installation and removal functions for whatever purposes necessary.

Note that dependencies will later include required features.

Cores

Cores provide necessary types and functions to dep for using everywhere.

Cores provide identifier types, installation and removal functions (with their error type), an installed object type, etc.

Cores need the best documentation - it is everything that the user provides to dep, and so needs to provide a great understanding of how to implement it.

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.