summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
Commit message (Collapse)AuthorAgeFilesLines
* Found an array that leaked pretty quickly between reparsingLuke Kanies2008-03-211-9/+12
| | | | | | | | | | files, thanks to work by Adam Jacob and Arjuna Christenson (the finding, not the leak). I'm going to act like this fixes #1131, at least for now, but I doubt it does, since that shows general memory growth over time, whereas the leak here should go away as soon as files are reparsed (because the parser is holding the reference to the leaking array).
* Always duplicating resource defaults in the parser, so thatLuke Kanies2008-03-062-21/+17
| | | | | | stacked metaparameter values do not result in all resources that receive a given default also getting those stacked values.
* Fixing the fact that resources that model defined resourcesLuke Kanies2008-02-291-0/+7
| | | | | were getting finished multiple times, which meant they got multiple copies of metaparams.
* Fixed #1047 -- Puppet's parser no longer changes the orderLuke Kanies2008-02-281-21/+3
| | | | | | in which statements are evaluated, which means that case statements can now set variables that are used by other variables.
* Fixed #1063 -- the master correctly logs syntax errors whenLuke Kanies2008-02-281-1/+5
| | | | reparsing during a single run.
* Fixing #1092 by no longer using the resource reference toLuke Kanies2008-02-281-3/+2
| | | | | | look resources up, which means there's no concern about not finding the resource, which is where the nil was coming from. We now just iterate over the vertices.
* Fixing #1085, I think -- I was not returning a resourceLuke Kanies2008-02-252-4/+8
| | | | | | if the class had already been evaluated, but this was only being run into in corner cases -- mostly where one class included another class, I assume.
* Fixing #1084 -- the node catalog asks the individualLuke Kanies2008-02-251-0/+9
| | | | | | resources whether they're isomorphic, and they in turn ask the resource types (or default to true for defined resource types).
* Corrected #1040 fix - this should now be right - trace was after raiseJames Turnbull2008-02-251-3/+1
|
* Second attempt fix address ticket #1040James Turnbull2008-02-191-3/+6
|
* Attempt to fix #1040 - catching errors in compilationJames Turnbull2008-02-191-1/+5
|
* Fixed #1003 -- Applying DavidS's patch to fix searching forLuke Kanies2008-02-131-1/+1
| | | | tags in sql.
* Fixed #968 again, this time with tests -- parseonly works,Luke Kanies2008-02-134-27/+32
| | | | | including not compiling the configurations, and also storeconfigs is no longer required during parse-testing.
* Merge commit 'bartv/pending/fix-997' into 0.24.xLuke Kanies2008-02-121-2/+6
|\
| * Fix bug #997, only evaluate non-virtual definitionsBart Vanbrabant2008-01-221-2/+6
| |
* | Moving the ast node tests to rspec (which I could haveLuke Kanies2008-02-125-38/+24
| | | | | | | | | | | | | | *sworn* I did this weekend). In the process, I fixed a couple of bugs related to differentiating between nodes and classes, and then cleaned up quite a few error messages.
* | Removing the last remaining vestiges of GRATR --Luke Kanies2008-02-111-3/+3
| | | | | | | | removing the bangs from 'add_vertex!' and 'add_edge!'.
* | Changing the name of the Compile class to Compiler,Luke Kanies2008-02-1112-32/+32
| | | | | | | | | | since it's stupid to have a class named after a verb.
* | Refactoring the interface between the Compile classLuke Kanies2008-02-111-3/+1
| | | | | | | | | | and the AST::Node class to match that to the definitions and AST classes.
* | Changing some methods in the Compile class toLuke Kanies2008-02-115-27/+27
| | | | | | | | | | be more internally consistent (switched store_resource to add_resource, and store_override to add_override).
* | Fixed #1030 - class and definition evaluation has been significantlyLuke Kanies2008-02-113-28/+27
| | | | | | | | | | | | refactored, fixing this problem and making the whole interplay between the classes, definitions, and nodes, and the Compile class much cleaner.
* | Converting the Compile class to use a Node::Catalog instanceLuke Kanies2008-02-112-57/+11
| | | | | | | | | | as its resource container, instead of having its own behaviour around resource uniqueness.
* | Moving all of the tests for Puppet::Parser::Compile toLuke Kanies2008-02-113-20/+17
| | | | | | | | | | | | rspec, so I can refactor the class to more heavily rely on a Node::Catalog instead of doing its own resource container management.
* | More AST refactoring -- each of the code wrapping classesLuke Kanies2008-02-086-266/+256
| | | | | | | | | | | | | | | | | | | | | | just returns a resource from its evaluate() method, and all of the work is done in the evaluate_code method. This makes the code cleaner, because it means 1) evaluate() has the same prototype as all of the other AST classes, 2) evaluate() is no longer called indirectly through the Parser Resource class, and 3) the classes themselves are responsible for creating the resources, rather than it being done in the Compile class.
* | Refactoring the AST classes just a bit. I realized thatLuke Kanies2008-02-0822-110/+68
| | | | | | | | | | | | all of the evaluate() methods only ever accepted a scope, and sometimes one other option, so I switched them all to use named arguments instead of a hash.
* | Removing some obsolete code from the AST base classLuke Kanies2008-02-081-39/+3
| |
* | Ceasing autoloading ast files; loading them manually insteadLuke Kanies2008-02-081-7/+21
| |
* | Merge commit 'bartv/pending/fix-933' into 0.24.xLuke Kanies2008-02-051-0/+2
|\ \
| * | Store a resource before adding relations to it otherwise activerecord willBart Vanbrabant2008-02-031-0/+2
| |/ | | | | | | complain. This fixes #933
* | Fixing #1017 -- environment-specific modulepath is noLuke Kanies2008-02-041-1/+1
| | | | | | | | longer ignored. (Cherry-picked from master.)
* | Significantly refactoring the lexer, including adding Token and TokenListLuke Kanies2008-01-302-275/+393
| | | | | | | | | | | | classes for managing how the tokens work. I also moved they tests to RSpec, but I didn't rewrite all of them.
* | Removing tons of unnecessary calls to "nil?" from the lexer.Luke Kanies2008-01-281-22/+6
|/
* Fixing #976 -- both the full name of qualified classes andLuke Kanies2008-01-191-25/+10
| | | | | | the class parts are now added as tags. I've also created a Tagging module that we should push throughout the rest of the system that uses tags.
* Applying a fix for #998 -- I used a patch equivalent toLuke Kanies2008-01-191-0/+3
| | | | | bartv's, although I could not use his commit because it was against the 'master' branch instead of 0.24.x.
* Fixing #982 -- I have completely removed the GRATR graph libraryLuke Kanies2008-01-071-5/+1
| | | | from the system, and implemented my own topsort method.
* Fixing #971 -- classes can once again be included multipleLuke Kanies2008-01-071-0/+3
| | | | times.
* Fixing #967 -- relationships now work when running 0.23.x clientsLuke Kanies2007-12-181-1/+7
| | | | against 0.24.0 servers.
* This should be the last fix for exported resources.Luke Kanies2007-12-111-0/+2
| | | | | | Hosts were keeping the export bit on all resources, even when they'd collected another host's resources, which caused a duplicate copy that was still exported.
* Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-114-23/+23
|
* Fixing #923. Resources that are collected on the localLuke Kanies2007-12-061-1/+0
| | | | host are no longer marked as not exported.
* Theoretically, this patch is to fix #917 (which it does), butLuke Kanies2007-11-284-27/+22
| | | | | | | | | | | | | | | | | | | there were enough problems fixing it that I decided something more drastic needed to be done. This uses the new Puppet::ResourceReference class to canonize what a resource reference looks like and how to retrieve resources via their references. Specifically, it guarantees that resource types are always capitalized, even when they include '::' in them. While many files are modified in this commit, the majority of changes are quite small, and most of the changes are fixing the tests to use capitalized types. As we look at consolidating some of our resource types, we could consolidate the ResourceReference stuff at the same time, but at least the Puppet::Parser::ResourceReference class subclasses the main Puppet::ResourceReference class.
* Fixing the first half of #917 -- the ResourcReferenceLuke Kanies2007-11-281-2/+2
| | | | | | AST code now correctly finds the resource. It's getting lost in the configuration translation, though, so I need to fix that, too.
* Fixing the error message as requested in #893.Luke Kanies2007-11-271-3/+1
|
* Fixing #921, mostly by just deleting the existing test. I hadLuke Kanies2007-11-261-2/+4
| | | | | | already migrated all of the tests into rspec but forgot about these tests -- they were only in the rails/ subdir because people kept not running the parser/ tests after modifying the Rails code.
* Incorporating patch ↵Luke Kanies2007-11-241-89/+75
| | | | | | | | | | 20071030034736-6856b-6004090b3968cdbf7d366a03ee1c44e2160a3fe0.patch from womble, and rewriting and significantly enhancing the unit tests for the Puppet::Parser::Collector class; it should have full coverage now. There are no integration tests for it, so there's still no guarantee that it works at all, but hey, we're a lot better off than we were.
* Adding patch ↵Luke Kanies2007-11-231-1/+1
| | | | 20070913032650-6856b-b1cca1c249415c6076ffcecb9df1525a728457c7.patch from womble -- Fix annoying database deletion error for ParamValue objects.
* Fixing the first part of #787. Not all collections wereLuke Kanies2007-11-201-4/+5
| | | | | | | | being evaluated on the first pass because they were being deleted from the collections list during evaluation, which caused some to get skipped. This commit fixes that problem, which helps in the trivial cases where the collections are in the same scope. I expect it's still broken for more complicated usages.
* Fixing a failing test from my fix for #446 -- I had changedLuke Kanies2007-11-191-6/+5
| | | | | | the behaviour of Resource#override_parameter unintentionally. I've corrected the comments so it's clear why the original behaviour was there.
* Fixing #446. I ended up largely not using porridge's patch,Luke Kanies2007-11-191-21/+34
| | | | | | but only because the code (and my coding style, to some extent) has changed so much in the last few months. Also, added specs.
* Fixing a parser test -- really, just removing testsLuke Kanies2007-11-132-1/+2
| | | | | | | | that belong with the AST classes rather than in the parser. Yeah, these tests need to be rewritten. Committed on an airplane. :)