Module eco::extract[][src]

Expand description

Extract dependency information from extract info.

Extract info

This is a JSON format with meta syntax ./assets/extract/syntax.txt.

It is used for collecting dependency data from raw Cargo.toml files.

Example:

{
   "pistoncore-input": {
       "url": "https://raw.githubusercontent.com/PistonDevelopers/piston/master/src/input/Cargo.toml",
       "ignore-version": "0.7.0"
   },

   "pistoncore-window": {
       "url": "https://raw.githubusercontent.com/PistonDevelopers/piston/master/src/window/Cargo.toml"
   },

   "pistoncore-event_loop": {
       "url": "https://raw.githubusercontent.com/PistonDevelopers/piston/master/src/event_loop/Cargo.toml"
   },

   "piston": {
       "url": "https://raw.githubusercontent.com/PistonDevelopers/piston/master/Cargo.toml"
   }
}

Fields:

  • url (the url to the raw Cargo.toml data)
  • ignore-version (don’t update projects using this version)
  • override-version (replace version extracted from Cargo.toml)
  • ignore (ignore update of specific dependency version)

Ignore version

The ignore-version field is used to delay updates, to reduce frequency of breaking changes, or put them on hold until some work is done.

Example:

A (uses B 0.7.0) -> B (0.8.0)

A new version of library B is available, but some work might be needed in A before releasing a new version. By listing “0.8.0” in the ignore-version field, there will be no recommended update for A. This will also avoid further updates for libraries depending on A triggered by this version.

This might cause unsoundness (see top level documentation) when done to a library that is not at the bottom of the dependency graph.

The rule used for ignoring version is: If the package has this version, then filter it from dependency info.

Override version

The override-version field replaces the version extracted from Cargo.toml with another version.

For example, a new library is published but the maintainer forgot to merge the changes into master.

Ignore

The ignore field specifies a collection of dependency versions to ignore. This allows precise control over which dependencies to update.

Example:

{
    "piston2d-opengl_graphics": {
        "url": "https://raw.githubusercontent.com/PistonDevelopers/opengl_graphics/master/Cargo.toml",
        "ignore": {
            "piston-shaders_graphics2d": "0.2.1"
        }
    }
}

This might cause unsoundess (see top level documentation) when some of the interface of the dependency is exposed in the interface of the library.

The rule used for ignoring dependencies is: If there is a recommended update to this version, then filter it from update info.

Structs

Stores extract information.

Functions

Converts meta data into Cargo.toml information.

Converts meta data into extract info.

Extracts dependency info.

Loads a text file from url.