summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/interpreter.rb
Commit message (Collapse)AuthorAgeFilesLines
* Clarifying the exception when there's a syntax error but a valid parser.Luke Kanies2008-05-121-1/+1
| | | | This is related to #1215.
* Fixed #1063 -- the master correctly logs syntax errors whenLuke Kanies2008-02-281-1/+5
| | | | reparsing during a single run.
* 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 #968 again, this time with tests -- parseonly works,Luke Kanies2008-02-131-20/+20
| | | | | including not compiling the configurations, and also storeconfigs is no longer required during parse-testing.
* Changing the name of the Compile class to Compiler,Luke Kanies2008-02-111-2/+2
| | | | | since it's stupid to have a class named after a verb.
* Renaming 'configuration' to 'catalog', fixing #954.Luke Kanies2007-12-111-1/+1
|
* Adding a :code setting for specifying code to runLuke Kanies2007-10-051-16/+3
| | | | | | | | instead of a manifest, and removing all of the ambiguity around whether an interpreter gets its own file specified or uses the central setting. Most of the changes are around fixing existing tests to use this new system.
* This commit is focused on getting the 'puppet' executableLuke Kanies2007-10-051-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | to work. As a result, it involves a lot of integration-level testing, and a lot of small design changes to make the code actually work. In particular, indirections can now have default termini, so that configurations and facts default to their code terminus Also, I've removed the ability to manually control whether ast nodes are used. I might need to add it back in later, but if so it will be in the form of a global setting, rather than the previous system of passing it through 10 different classes. Instead, the parser detects whether there are AST nodes defined and requires them if so or ignores them if not. About 75 tests are still failing in the main set of tests, but it's going to be a long slog to get them working -- there are significant design issues around them, as most of the failures are a result of tests trying to emulate both the client and server sides of a connection, which normally would have different fact termini but in this case must have the same terminus just because they're in the same process and are global. The next step, then, is to figure that process out, thus finding a way to make this all work.
* Fixing #814 -- when files are missing, the exceptions shouldLuke Kanies2007-10-031-8/+11
| | | | now be more reasonable.
* Renaming the 'Puppet::Util::Config' class toLuke Kanies2007-09-221-1/+1
| | | | | | | 'Puppet::Util::Settings'. This is to clear up confusion caused by the fact that we now have a 'Configuration' class to model host configurations, or any set of resources as a "configuration".
* Fixing #807. The exception handling should more closely resemble how it ↵Luke Kanies2007-09-061-6/+13
| | | | used to be done.
* Multiple environment support now works, and I have even tested it in real ↵Luke Kanies2007-08-261-0/+3
| | | | life. This commit is mostly a bug-fix commit, resulting from the difference between real-life testing and unit testing.
* And we have multiple environment support in the parser. The only remaining ↵Luke Kanies2007-08-251-2/+2
| | | | piece to make this complete is to add multiple environment support to the fileserver. I also renamed Configuration.rb to Compile.rb (that is, I fixed all the classes that used to know it as a configuration).
* Renaming the "configuration" object to "compile", because it is only a ↵Luke Kanies2007-08-251-1/+1
| | | | transitional object and I want the real "configuration" object to be the thing that I pass from the server to the client; it will be a subclass of GRATR::Digraph.
* Adding some rspec tests for Config.rb, because I am planning on ↵Luke Kanies2007-08-231-1/+1
| | | | significantly changing its internals and the current tests, I think, will be harder to migrate than just writing rspec tests from scratch.
* Everything up to the parser (and the Modules) is ready to support multiple ↵Luke Kanies2007-08-231-95/+45
| | | | environments, including the parser having an environment setting. I have also created my first spec-based tests, for the interpreter (and deleted the old test/unit tests).
* Fixing the integration test between interpreter and configuration -- the ↵Luke Kanies2007-08-221-1/+1
| | | | interpreter was not passing on that the config should use ast nodes
* A round of bugfixing. Many more tests now pass -- I think we are largely ↵Luke Kanies2007-08-201-0/+1
| | | | down to tests that (yay!) fail in trunk.
* All language tests now pass. I expect there are other failures elsewhere, ↵Luke Kanies2007-08-201-32/+0
| | | | but I want to commit this before delving into them. My method for fixing the tests was to do as little as possible, keeping the tests as bad or as good as they were before I started. Mostly this was about changing references to the interpreter into references to the parser (since that is where the new* methods are now for ast containers) and then dealing with the new config object and its relationship to scopes.
* The first pass where at least all of the snippet tests pass. I have ↵Luke Kanies2007-08-201-1/+2
| | | | unfortunately had to stop being so assiduous in my rewriting of tests, but I am in too much of a time crunch to do this "right". The basic structure is definitely in place, though, and from here it is a question of making the rest of the tests work and hopefully writing some sufficient new tests, rather than making the code itself work.
* The new parser configuration object works now,Luke Kanies2007-08-161-388/+13
| | | | | | | | | | | | | | but the rest of the compiling process is hosed (although the parser itself should still be fine). The configuration object is unifying a lot of work that was scattered around either the interpreter or the scopes, and it simplifies the whole system. However, its new simplicity has made the complexity of the rest of the system that much more apparent, and I am resolved to fixing the system rather than hacking it sufficiently to just make it work.
* An intermediate commit in the work towards adding multi-environment support.Luke Kanies2007-08-141-163/+0
| | | | | | | | This has required splitting the interpreter up considerably, which is much cleaner but is a large project. There is now a 'nodes' handler, but it is currently non-functional, although all the support structure is there. It just needs to have the individual methods fleshed out, and it needs to be connected to the 'facts' handler.
* Applying patch by Adam Jacob to make external node tools able to handle ↵Luke Kanies2007-08-131-2/+7
| | | | command-line arguments
* Fixing #314 and #729; here's the changelog:luke2007-08-031-214/+37
| | | | | | | | | | | | | | | Refactored how the parser and interpreter relate, so parsing is now effectively an atomic process (thus fixing #314 and #729). This makes the interpreter less prone to error and less prone to show the error to the clients. Note that this means that if a configuration fails to parse, then the previous, parseable configuration will be used instead, so the client will not know that the configuration failed to parse. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2742 980ebf18-57e1-0310-9a29-db15c13687c0
* Caching whether a given file or module has been loaded, because the loading ↵luke2007-07-201-7/+12
| | | | | | was greedy and was causing files to get loaded every time a class or module was asked for git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2720 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the interpreter autoloading so that it correctly loads classes even ↵luke2007-07-121-58/+40
| | | | | | when being loaded from a namespace git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2686 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing a typo in a log messageluke2007-07-091-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2666 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #687.luke2007-07-091-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2662 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #596 -- classes in modules now autoloadluke2007-07-061-6/+58
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2655 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing extra debugging from the interpreterluke2007-06-191-2/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2626 980ebf18-57e1-0310-9a29-db15c13687c0
* More test fixes. I seem to be getting very close.luke2007-06-191-0/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2624 980ebf18-57e1-0310-9a29-db15c13687c0
* Significantly reworking both external_nodes and ldapnodes support (see ↵luke2007-06-151-124/+133
| | | | | | changelog). git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2587 980ebf18-57e1-0310-9a29-db15c13687c0
* Consolidating all of the configuration parameter declarations into ↵luke2007-05-041-55/+0
| | | | | | configuration, at least partially just because then the docs for each parameter have to be a bit better. Also, I have gotten rid of the "puppet" section, replacing it with "main", and changed, added, or removed a couple of other sections. In general, we should now prefer more sections, rather than fewer. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2463 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #615 (subclasses with similar names) by getting rid of the class ↵luke2007-05-031-26/+22
| | | | | | "type" and "fqname", and instead using "classname" everywhere. You should no longer see unqualified class/definition names anywhere. Also, rewriting how snippet tests work, to avoid creating all of the files, since the point was the parsing tests, not functional tests. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2458 980ebf18-57e1-0310-9a29-db15c13687c0
* Not stripping domain info from the ldap node, as requestedluke2007-04-301-4/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2432 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a migration to create indexesluke2007-03-211-1/+1
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2342 980ebf18-57e1-0310-9a29-db15c13687c0
* Clarifying the errors a bit when nodes come from external sources.luke2007-03-191-4/+11
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2324 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing extraneous debuggingluke2007-02-181-5/+0
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2215 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing a problem in collecting exported resources. Virtual resources worked ↵luke2007-02-181-1/+6
| | | | | | fine, but exported resources resulted in an essentially infinite loop. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2213 980ebf18-57e1-0310-9a29-db15c13687c0
* Revamping collections to get what is hopefully more reasonable behaviour ↵luke2007-02-161-7/+32
| | | | | | when they are used in combination with defined resource types. You should now be able to combine them in just about any way and get "correct" behaviour, which in this case means that you can have virtual definitions or definitions wrapping virtual resources and the resources will still all get realized. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2198 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving some of the stand-alone classes into the util/ subdirectory, to clean ↵luke2007-02-071-2/+2
| | | | | | up the top-level namespace a bit. This is a lot of file modifications, but most of them just change class names and file paths. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2178 980ebf18-57e1-0310-9a29-db15c13687c0
* Further work on #407. I forgot to actually connect it to the interpreter ↵luke2007-01-051-0/+4
| | | | | | internals. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2050 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #407. You can use external_node to specify a command to retrieve ↵luke2007-01-051-1/+49
| | | | | | your node information. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2049 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding extra connection statements and enabling concurrency support in ↵luke2007-01-031-1/+3
| | | | | | rails, hopefully fixing #399. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2027 980ebf18-57e1-0310-9a29-db15c13687c0
* Trying to clean up how rails is loadedluke2006-12-291-9/+9
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1989 980ebf18-57e1-0310-9a29-db15c13687c0
* A couple of small bug-fixesluke2006-12-281-8/+2
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1976 980ebf18-57e1-0310-9a29-db15c13687c0
* Loading the rails lib early on, so that the rails configuration parameters ↵luke2006-12-231-1/+1
| | | | | | are accepted on the CLI, as noted in #357. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1968 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #343. Collections and definition evaluation both now happen on every ↵luke2006-12-231-15/+23
| | | | | | iterative evaluation, with collections being evaluated first. This way collections can find resources that either are inside defined types or are the types themselves. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1967 980ebf18-57e1-0310-9a29-db15c13687c0