GithubHelp home page GithubHelp logo

pombredanne / depslint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maximuska/depslint

0.0 2.0 0.0 60 KB

A tool for dependencies validation for ninja build system using strace to detect the real dependencies

License: Apache License 2.0

depslint's Introduction

Introduction
============

Depslint is a tool for analyzing and verifying build dependencies. It
was written to assist switching a large project build system from an
existing complex legacy solution to ninja.

The tool works by running a complete build under 'strace',
recording relevant system calls to discover real 'dependencies',
and then verifying that dependencies defined in the ninja manifest and
the corresponding depfiles are correct.

Purpose
============
Verify a build manifest for:

* Correctness of the 'first build' (e.g., building following a
  pristine checkout, before any dep files are available). This is
  mostly useful for projects with autogenerated headers, to verify
  that build rules enforce autogenerated files to be created before
  including source files are compiled.

* Correctness of the 'incremental build' (e.g., rebuild following a
  modification of any of the files under the build tree when the tree
  already contains some of the build products and dep files).

* Redundant dependency specifications in the manifest making incremental
  rebuilds longer than needed.

* More..

Quick usage guide
=================
cd ~/myproject
ninja -t clean
git clean -fdX

# You can substitute the above with a suitable command cleaning your
# build tree.

~/depslint/depstrace.py ninja

# The above will build your project under 'strace', parse output and
# store discovered dependency information in 'deps.lst'. The complete
# strace output will also be stored in 'strace_log.txt' for debugging,
# if necessary.

~/depslint/depslint.py --stats=all

# Parse build.ninja, load depfiles, build dependency graph and
# validate it using 'real' dependency information in 'deps.lst'. If
# '.depslint' file is available, it can be used to set
# 'IGNORED_SUFFICES' and 'IMPLICIT_DEPS_MATCHERS' to ignore certain
# dependecy issues. Tool output with extra details is stored to
# 'depslint.log'.

Documentation
=============
The documentation will eventually appear under doc/.

Hacking & Testing
=================

There are unit-tests available under 'tests' directory. You can run
these as: 'python -m unittest tests' under project root. If you wish
to contribute changes, it would be best if you will add supporting
tests as well.

depslint's People

Contributors

maximuska avatar nico avatar

Watchers

 avatar  avatar

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.