sneeker
c4f033ee38
feat(dot): emit Graphviz source for the action graph
...
Nodes coloured by action kind, with a targets-only mode for graphs too large
to read in full.
2022-06-19 01:08:42 +00:00
sneeker
d4e210f33c
feat(compdb): write compile_commands.json for clangd
...
One entry per translation unit with directory, arguments and file, taken from
the compile actions already in the graph.
2022-06-17 19:15:48 +00:00
sneeker
720efd5c74
feat(sched): dispatch ready actions under a job limit
...
Checks each node's key at the moment it becomes ready rather than up front,
because an input may have been produced by a node that ran seconds earlier.
This is what gives early cutoff.
2022-06-15 20:17:47 +00:00
sneeker
34ddbac28b
feat(build): lower resolved targets into graph actions
...
Emits compile, archive, shared-link and link actions per target, and applies
-fPIC to anything reachable from a shared target.
2022-06-13 08:04:17 +00:00
sneeker
b701d27c7d
feat(dep): source header edges from compiler depfiles
...
Parses -MMD -MF output, unfolding line continuations, so the include set comes
from the compiler rather than from hand-maintained declarations.
2022-06-12 22:24:06 +00:00
sneeker
a4abbbdc3c
feat(cache): key actions on content, argv and the real input set
...
Digests every input plus the exact argument vector into one key, persisted
under the build directory. Staleness becomes a content question rather than a
timestamp comparison.
2022-06-12 01:49:31 +00:00
sneeker
0ad5138b52
feat(graph): derive edges from which node produces which file
...
Indexes producers by output path, so a generator and the compile consuming its
output are connected without being declared. Detects duplicate producers and
reports dependency cycles by path.
2022-06-09 14:01:08 +00:00
sneeker
ac9d0232f4
feat(resolve): lower surviving blocks into targets and rule instances
...
Expands globs, resolves use edges between targets, propagates inherited
includes, and instantiates a rule once per matched input.
2022-06-08 10:43:20 +00:00
sneeker
bb5f1f1509
feat(eval): evaluate statements in written order
...
Expands variables top to bottom, runs checks as they are reached and evaluates
conditionals against results already established. Written order is the
semantics, not an implementation detail.
2022-06-06 11:35:41 +00:00
sneeker
9537254533
feat(configh): generate a guarded C header from probe results
...
Emits the project name and the HAVE_ and SIZEOF_ defines from what the probes
actually found, behind an include guard derived from the output path.
2022-06-05 22:51:52 +00:00
sneeker
3e7afc520e
feat(probe): detect headers, functions, symbols, sizeof and pkg-config
...
Compiles and links throwaway programs to answer each check, and shells out to
pkg-config for cflags and libs. Results are memoised on the toolchain.
2022-06-03 09:35:23 +00:00
sneeker
78adab8c49
feat(exec): spawn subprocesses and capture stdout and status
...
Argv-vector execution with no shell in the path, so arguments containing
spaces or quotes need no escaping.
2022-06-01 08:37:55 +00:00
sneeker
38759f5e61
feat(parse): parse the grammar with recursive descent
...
Turns tokens into the AST, and consults suggest at each failure point so an
unknown declaration or field offers the nearest valid name.
2022-05-30 01:11:45 +00:00
sneeker
a629b2a967
feat(ast): model statements, blocks and nested conditionals
...
Keeps written order, so a later branch can observe the result of a check that
appeared earlier in the file.
2022-05-29 08:59:55 +00:00
sneeker
4d26b548ba
feat(lexer): tokenise build files with a span on every token
...
Words, strings, braces and comments, each carrying its source range, so an
error points at the offending token rather than the whole line.
2022-05-27 13:59:46 +00:00
sneeker
53ac3ffb4c
feat(types): define resolved project, target and rule records
...
Targets carry sources, includes, flags and uses; rule instances carry resolved
inputs and outputs. This is the shape every later stage consumes.
2022-05-26 00:17:18 +00:00
sneeker
c490488423
feat(suggest): rank near-miss names by edit distance
...
Levenshtein with a cutoff, returning the closest valid name at a position, or
nothing when no candidate is close enough.
2022-05-25 15:17:54 +00:00
sneeker
b48cd708a4
feat(json): emit JSON with correct control-character escaping
...
So generated output survives paths containing spaces, quotes or backslashes.
2022-05-23 21:14:56 +00:00
sneeker
598ccfd4c0
feat(glob): expand source patterns without shelling out
...
Matches *, ? and ** against directory entries directly, so src/**/*.c
resolves identically regardless of the shell.
2022-05-21 21:37:43 +00:00
sneeker
dfa033fea4
feat(fs): add recursive mkdir, whole-file IO and mtime reads
...
Path joining, read, write, is_dir and mtime, used by every later stage that
touches disk.
2022-05-21 12:14:44 +00:00
sneeker
79ed836641
feat(ident): normalise names into C macro identifiers
...
Uppercases, replaces non-alphanumerics with underscores, and derives the
HAVE_X and SIZEOF_X forms the generated header uses.
2022-05-20 03:45:44 +00:00
sneeker
c42ff512d1
feat(diag): render errors with a caret and the offending line
...
Formats file:line:col, re-reads the source to print the line, underlines the
span and leaves a slot for a suggestion.
2022-05-18 08:54:32 +00:00
sneeker
71a8aaa436
feat(style): gate ANSI colour on tty detection
...
One wrapper per colour plus a padding helper, all no-ops when stdout is not a
terminal, so piped output and CI logs stay readable.
2022-05-17 19:36:28 +00:00
sneeker
58f5aa0f98
feat(span): track byte ranges so errors can point into source
...
Span.t carries file, offset and length, with join to merge two spans and a
none sentinel for synthesised nodes. Every token and node gets one.
2022-05-17 08:50:46 +00:00
sneeker
d407f9eb45
build: add dune project skeleton and library stanza
...
The meow library against unix, plus ignore rules for _build, generated
sources and the meowc symlink.
2022-05-16 09:42:00 +00:00