Code Monkey home page Code Monkey logo

tundra's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tundra's Issues

Tundra doesn't always parse tundra.lua when it has been modified

Repro:

  1. build e.g. rev6 with tundra (win32-msvc)
  2. add
    PROGOPTS = {
    { "/ENTRY:WinMain"; Config = { "win32--", "win64--" } },
    }
    to common Env
  3. run tundra
  4. /ENTRY:WinMain is not included in the linker options as expected

tundra -c and deleting all .tundra-* files is a workaround.

Support for cross-compilation

Tundra can already build foreign programs just fine, but a cross-compilation aware configuration is needed e.g. for consoles when compiling tools.

Add signature debugging support

Tundra should have a way to dump all elements of the signing process in human-readable form to facilitate debugging of build issues.

Cache frontend state to improve incremental startup

If we can figure out a way to cleanly cache the configuration up to the point where the declarative input is sent to the node generators, it should be totally possible to cache this state to disk and reuse it for subsequent incremental builds.

This would primarily mean that all file globs were cached, so an alternative way to implement this is to cache on the glob level.

Avoid copying all strings from Lua

Because Lua already has defined all the strings we need (filenames, annotations and so on) it doesn't make sense to copy them. A better idea would be just to make sure they're kept alive on the Lua side and then use the pointers directly.

Possibility to flag output files as persistent

Currently files sent to env:make_node(.. OutputFiles = { ... } } will always be deleted before the run or when doing a tundra clean.

This is the wanted behavior in many situations but if you want to generate something to be included in the source tree (that generates something that takes a long time to generate) this is not wanted so the possibility to override the cleaning of files by adding another flag to make_node would be useful.

Clean up filtering, source analysis in Lua scripts

Need a cleaner way to filter general lists of sources in custom node handlers and syntax nodes; see osx-bundle for example. The Resources list handling in there is awkward when there are source generators (functions) in the list.

Some better structured helper functions in nodegen.lua could help with this.

Support per-directory options from config file

Support storing stuff such as:

  • CPU count
  • Verbosity levels
  • Named targets
  • Toolsets

Essentially command line arguments into a config file. Provide a --config option similar to git that allows you to set/list these options.

Persist relation cache to disk

The headers in the relation cache could be persisted to disk to speed up implicit dependency scanning on the next run.

Care must be taken though as this process is already very fast, a few hundred headers are scanned from disk cache in a matter of 60-100 milliseconds even on NTFS. When the project is so big that headers are ejected from the disk cache however, this will provide more gains as we don't have to run around opening files to see what headers they include.

Tundra should use a "success means no output" philosophy

Tundra should use the unix philosophy of not printing anything to stdout if the operation completes as expected. So a successful tundra build should look something like this:

$ tundra
$

A clean:

$ tundra -c
$

A failed build:

$ tundra
Error C1234: foo bar myfile.c (1234)
etc...
$

Easiest implementation is probably to write stdout/stderr to file and then dump it if an error is detected (a regex?)

If this is a performance issue (shouldn't be for incremental builds as the output usually is tiny), then a --silent option could be added which enables this behavior.

Make file extensions for C, C++, Obj-C fully configurable

Currently one need to change in generic-cpp.lua to add a custom extension (in my case .vcc that builds as a regular C file) but also other file types (like assembler for example) would be nice if you just can override in a simpler way.

Command output garbled on windows with many jobs

This happens because the individual child processes do not synchronize when writing to the terminal stream. One approach would be to create a bidirectional pipe and handle I/O this way, but this creates pretty sloppy stalls for error messages and such. It's however the only way I can think of.

Clean up native code

The native code (especially engine.c) should be split up more clearly into various modules:

  • Data collection (Lua interfacing code) - This code never has to worry about threading so it can be simpler and use various traditional tricks
  • Native setup - Ancestor loading, saving etc
  • Building - This code must always worry about correct locking

Also, engine is a misleading name as it is just a shell for data collection and starting the build; the actual build engine is in build.c. The engine file should be renamed to something else.

Support paths outside the build dir

E.g. referencing sources with ../../ will create broken output paths and what not and probably trigger native code errors due to path normalization issues. We should allows paths such as this in the best way possible. Also support fully qualified paths.

Let 'Depends' configure CPPPATH as well as LIBPATH/LIBS

It would be very nice if Depends={"Fiskrens"} was everything required to use the fiskrens lib. So if there was some kind of way to specify the "Use headers" needed for using the lib, in addition to the headers needed to actually compile it, that'd be awesome.

Win32 - Change journal integration

Here's what we could accelerate with the change journal:

  • Globbing (Keep an database of files)
  • Signing (Store content digest for each file in the database)

The drawbacks are:

  • Change journal access requires administrator level privileges
  • The change journal is global for the drive, so on busy drives (C:) there is a lot of irrelevant traffic to parse through

Don't duplicate all environment strings

Currently external environment strings are duplicated for all nodes which wastes a lot of memory. These are immutable and could be kept in a hash table instead.

Propagate static lib dependencies up the chain

It would be useful to have static libraries "Depends" work recursively, so

StaticLibrary { Name = "foo", ... }
StaticLibrary { Name = "bar", Depends = { "foo" }, ... }
Program = { Name = "qux", Depends = { "bar" }, ... }

Would automatically link qux with foo.

Incremental build sometimes fails. Clean and rebuild necessary.

After a handful incremental builds of rev6 I get the following error:

:!tundra 2>&1| tee /var/folders/2Y/2Y8Mu557HiOQdnfUtC388U+++TI/-Tmp-/v644169/18
ld: in tundra-output/macosx-clang-debug-default/r6_ui.a(), archive member '' with length 0 is
not mach-o or bitcode
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Cc tundra-output/macosx-clang-debug-default/Source/r6_ui_test/ui_test2.o
Cc tundra-output/macosx-clang-debug-default/Source/r6_ui/rs_ui_render_glut.o
StaticLib tundra-output/macosx-clang-debug-default/r6_ui.a
Program tundra-output/macosx-clang-debug-default/ui_test2
*** build failed, 4 jobs run
(1 of 7): ld: in tundra-output/macosx-clang-debug-default/r6_ui.a(), archive member '' with le
ngth 0 is not mach-o or bitcode

It appears as if some random object file is corrupted.

tundra -c and then a rebuild solves the problem.

Support same source file in multiple units

Use a collision map to avoid errors such as this:

Cc foo.o: file foo.o is already an output of Cc foo.o

This happens if you do e.g.

Program { Name = "foo", Sources = { "baz.c" } }
Program { Name = "bar", Sources = { "baz.c" } }

Add support for custom signer functions written in Lua

This is desirable so projects can avoid relinking e.g against shared libraries when only their public interfaces have changed.

The way to implement this is to let the frontend hook in a sign function on the link phase for the shared libraries so they can override the exposed file signature on the .dll and .lib files (or .so, .dylib files).

Delete output files of certain commands before running them

E.g. MacOSX ar doesn't like just updating the same archive over and over again.

  • Add a new per-node option OverwriteOutputs that defaults to true
  • If the option is false, delete the output files of the node before the action is run
  • Add environment/extension option to somehow set this new node option on archive files

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.