Commit Graph

109 Commits

Author SHA1 Message Date
Joshua Harrison 6add99aeef Modify the interface between LogSources and LogSinks such that log
messages are keyed dictionaries as opposed to tuples.
2015-01-08 19:58:16 -08:00
Joshua Harrison 96f08e1b41 Fix relative mocking paths in unit tests. 2014-12-28 22:39:18 -08:00
Joshua Harrison 0db679aa83 Small doc fix. 2014-12-28 22:29:50 -08:00
Joshua Harrison f414f29a56 Add an author line and a basic LogSink. 2014-12-28 21:01:35 -08:00
Joshua Harrison c1b5b29b36 Tweak logging to add DebugLevel in message.
Modified log messages to include the debug level in preface to all messaages.

Also added a utility method to enums to convert DebugLevels to strings.
2014-12-28 20:33:24 -08:00
Joshua Harrison 979bb2ce1a Add sending of messages to LogSinks along the inheritance chain og LogSource.
Modify LogSource such that adding a child to a LogSource will cause the child to
automatically inherit any LogSinks from the parent. Also prevent duplicate
LogSinks on a given LogSource.
2014-12-28 13:25:21 -08:00
Joshua Harrison c2f2d85152 Add an interface for attaching LogSinks to LogSources.
Add an interface for adding LogSinks to LogSources and sending
messages to the LogSinks.

Also updated the setup to depend on Blessings, which is a terminal control
program. This will be used in creating a console log sink in order to
achieve text coloring and cursor positioning.
2014-12-28 13:15:27 -08:00
Joshua Harrison 2031d747a1 Added WorkUnitLogSource for monitoring and logging WorkUnits.
Added a WorkUnitLogSource that extends LogSource and implements the methods
required to be a WorkUnit change listener. The class converts updates from
a WorkUnit into LogSource log messages.

Also added a string formatting method to the enums package to convert Status
enum values back to string equivalents.
2014-12-27 08:14:53 -08:00
Joshua Harrison 0a41d2ea77 Add a LogSource class and tests.
Adds a LogSource class meant to keep track of log messages at different
LogLevels. This initial commit creates a class that will buffer messages
at LogLevels that should be displayed given the LogSource's verbosity
level. Future commits will add the ability for LogSource's to interact
with or be used by LogSinks.
2014-12-26 16:24:30 -08:00
Joshua Harrison 5434624dc9 Complete the WorkUnit class and add comments.
Added listener functionality to the WorkUnit class, allowing for an object to
receive notifications when the WorkUnit's values are updated.

Also finished commenting the WorkUnit class and adding tests for the listener
functionality.
2014-12-26 08:15:18 -08:00
Joshua Harrison 08fedbd621 + Adding an enums file containing all the constants to be used by
anvil. Updated context.py to use it.

+ Added the build_logging package which will contain components
related to build logging.

+ Added the WorkUnit class to the build_logging package. This class
tracks the progress of work units, along with their status and the
start and end time of a discrete work unit. WorkUnit classes can be
composed into Parent/Child relationships, in which case the parent
classes will try to inherit information from their children.
2014-12-25 11:59:13 -08:00
Ben Vanik 455444073b Merge pull request #8 from Husafan/context
Fix test failure and restructure the BuildContext execution.
2014-12-02 12:24:57 -08:00
Joshua Harrison a7285c56c0 RuleContext#_check_if_cached returns False BuildContext.force is True.
Modify the RuleContext so that #_check_if_cached returns false when the
BuilContext contains force=True.
2014-12-01 10:42:29 -08:00
Joshua Harrison 1542453643 Add cache tests and cache support for rules with no src/output
+ Add cache tests for the RuleContext#_check_if_cached method.
+ Return False from RuleContext#_check_if_cached if there are no src or output files. This is necessary to allow rules such as shell_execute to run even if there are no src or out attributes to the command.
2014-12-01 09:17:09 -08:00
Joshua Harrison 48755c148e Fix test failure and restructure the BuildContext execution.
+ Fix test failure with the BuildContext that was occurring because the
  stop_on_error flag was not having the intended effect.
+ Removed the BuildContext#_pump method and replaced it with
  BuildContext#_chain_rule_execution. The new method instantiates
  RuleContexts for each rule as it iterates through the rules that need
  to be built. It then uses deferreds to chain rule execution depending
  on the resolution of dependencies.
2014-11-29 12:54:07 -08:00
Ben Vanik 69f95c9427 Making the base.js search not depend on line endings. Fixes Windows. 2013-11-05 15:31:01 -08:00
Ben Vanik 4d216b57f0 Adding binary support to the embed rule. 2013-07-23 12:43:49 -07:00
Ben Vanik ec2fa7efcc New stylesheets compiler likes split hyphens mode, otherwise it warns. 2013-06-17 16:40:30 -07:00
Ben Vanik 49500090be Updating js processing support the new @provideGoog comment. 2013-06-13 13:51:38 -07:00
Ben Vanik 7ea327ffd8 Adding support for base64 encoding embedded content. 2013-04-01 16:05:35 -07:00
Ben Vanik 1017637063 Adding local virtualenv setup on Windows and defaulting to -j1. 2012-12-27 13:19:38 -08:00
Ben Vanik 82739f0b06 Fixing relative path of embed_files. 2012-12-25 02:17:37 -08:00
Ben Vanik 59b07c0262 Adding %path% to embed_files. 2012-12-23 23:42:57 -08:00
Ben Vanik 235c649de5 Remove LESS --strict_imports, as it's bad. 2012-12-23 00:37:30 -08:00
Ben Vanik 604ef8f59b Adding embed_files rule. 2012-12-22 22:48:50 -08:00
Ben Vanik 7077fdc2b2 Adding a less_css_library rule.
Requires npm install less.
2012-12-22 18:44:11 -08:00
Ben Vanik 5acff8ee9c Fixing an off-by-one bug that was preventing the proper dependency checks 2012-11-12 15:38:25 -08:00
Ben Vanik 014c540b44 Fixing server mimetypes on OSX 2012-10-17 18:23:20 -07:00
Ben Vanik a674df5376 Fixing test breaks 2012-10-11 12:01:58 -07:00
Ben Vanik 3815a2b938 Fixing multiprocessing cache saves and failure modes 2012-10-11 11:55:30 -07:00
Ben Vanik 5b1f9f8240 omg multiprocessing of tasks! Still likely some bugs here, and only tested on linux, but woo! 2012-10-10 14:29:02 -07:00
Ben Vanik 314442c67e Fixing --force to ignore cache 2012-10-10 13:16:32 -07:00
Ben Vanik 58783a53aa Fixing to run against networkx 1.7 (latest) 2012-10-10 10:47:02 -07:00
Ben Vanik 831eaea5ab Merge branch 'master' of https://github.com/benvanik/anvil-build 2012-10-10 10:10:43 -07:00
Ben Vanik f1b129f31b Making jscompiler 3x faster 2012-10-10 10:10:27 -07:00
Ben Vanik 9bd348577a Fixing path stripping regression 2012-10-08 22:11:58 -07:00
Ben Vanik e3ca70b81e Adding a 'copy_file' rule 2012-10-08 19:42:10 -07:00
Ben Vanik a81585b686 Adding an 'overlay' command that does what the overlay_view does 2012-10-08 19:27:42 -07:00
Ben Vanik 0105c78d9b Fixing test breaks 2012-10-08 15:48:11 -07:00
Ben Vanik 98c5fcaaff Adding preprocess and overlay_view rules 2012-10-08 15:38:44 -07:00
Ben Vanik 5698d2d659 Adding the ability to write out file listings for JS apps 2012-10-08 10:56:54 -07:00
Ben Vanik 7c970a6c86 Allow for specifying the Closure Linter module path 2012-10-01 11:14:02 -07:00
Ben Vanik cfc08559f7 Fixing bad name 2012-10-01 10:31:20 -07:00
Ben Vanik 6039267885 color-stop should really be allowed always 2012-09-26 16:03:07 -07:00
Ben Vanik ab8b57a314 Fix caching bug 2012-09-20 23:19:15 -07:00
Ben Vanik f3212809f7 Caching implemented - seems to work 2012-09-20 10:23:59 -07:00
Ben Vanik c42ef55533 Preserve metadata when copying files (like file times) 2012-09-20 09:57:57 -07:00
Ben Vanik 0f9896106a Starting caching work 2012-09-20 00:17:55 -07:00
Ben Vanik b37e6ee560 Dummy cache work - not yet doing anything 2012-09-19 23:35:45 -07:00
Ben Vanik d0d192860e Stub out caching functionality 2012-09-19 21:21:59 -07:00