Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The LHS (type name) of a Resource Expression is specified as
QualifiedName or QualifiedReference (or to be a Resource[T]). The
implementation did not work when given a QualifiedReference (runtime
error, due to errors in the error checking).
This both fixes the runtime error, and makes a string that
complies with QualifiedReference work. (An actual QualifiedReference
evaluates to Resource[T], so that already worked).
This also removes a call to debugger in relationship operator (that
would be triggered if user tried to create a resource from a non
CatalogEntry type).
|
|
|
|
|
|
|
|
This changes the following:
* Assignment has lower precedence than resource expressions
* Local defaults are supported in resource instantiation expressions
* A Resource body may have a new expression AttributesOperation that
must evaluate to a hash.
* Stricter validation of resource titles
* Changes to TreeModelDumper wrt how BlockExpression is rendered (to
improve debugging output). As a consequence many tests needed
adjustments.
* Tests that previously passed have been modified because of stricter
validation.
This also includes maintenance. Removing dead code/fixing stale comments
and documentation.
|
|
This asserts that the given type name conforms to the name rule as we
want to avoid having instances of PResourceType that are not correct.
|
|
This adds the token name to the debug string. It used to only
contain the token text which is not enough since there are several
tokens tht have the same text.
|
|
This adds output of the token number when an error occurs (it otherwise
only outputs the text representation, and there are several tokens where
the text is the same). This only matters when debugging a grammar and
this behavior is used when @yydebug manually has been set to true.
This commit also cleans up dead comments and removes unused code.
|
|
|
|
This adds the --dump action to the parser face which performs a
tree dump of the produced AST model using the future parser.
The command accepts an additional --[no]-validate option to turn off
validation (the default validates). Without validation only syntax
errors terminate the dump.
The -e option (chosen to mimic -e to apply) accepts the source on the
command line. Alternatively the source can be fed to stdin, or given as
a series of files (without -e option)
This command is useful because it is otherwise required to instrument
the code to get a dump of the result when working on parser related
bugs.
|
|
The implementation no longer needs to transform resource expressions
to 3x AST. This changes the transformer to raise an error if attempted.
The spec test for resource transformation is also dropped. No new
test added that transformer raises exceptions for resource
transformation since all transformation eventually will be dropped.
|
|
This adds methods to Factory and Lexer2::Token that produce output
suitable for output from a parser in debug mode.
The reason for this change is that default inspect output was produced
and this created very poor signal to noise ratio in the debug output.
|
|
The parser generated by using make egrammar.debug should NOT be checked
in, as it is slower and produces lots of output at the end.
|
|
(PUP-2912) Puppet FS symlinks in build/unpack
|
|
Prior to this commit build/unpack were trying to use the Ruby stdlib symlink to
deal with symlinks. This fails on platforms (Windows) that Puppet says supports
symlinks because it does not duck punch Ruby stdlib.
This commit switches the specs and code for build/unpack to use Puppet FS lib's
symlink functions. This should allow it to function correctly on Windows hosts that Puppet
supports symlinks.
|
|
* upstream/stable:
(PUP-2991) Restore ability to manage shells on solaris
|
|
(PUP-2860) optimizations and maintenance
|
|
Background: for PUP-1448 commit 73b0c2b0 added a new feature
for user providers `manage_shells`. The intent of that commit
was to add this feature to all existing user providers which
had that feature, and several were covered, but Solaris was
missed.
This commit simply adds the `manage_shells` feature to the
Solaris user provider, following up on the intent in PUP-1448.
|
|
The `masterlog` setting is dead code, not used anywhere and has been removed in
Puppet 4.
|
|
This removes the extra array being created for every token returned
from the lexer - the token is already an array with the correct
content.
|
|
This was a manual merge mistake.
|
|
(PUP-2912) PMT Build symlink exception
|
|
Prior to this commit a malformed name in the dependencies for a downloaded forge
module dependency would cause the PMT to fail unexpectedly.
This commit causes the PMT to ignore malformed dependencies.
|
|
In environments with lots of facts puppet agent can fill the
screen and log files with loading fact messages. This is only
useful when debugging and should thus be only enabled when in debug mode.
|
|
fiddyspence/feature/2945/warning_on_windows_package_source
(PUP-398) Windows package provider source munging and test
|
|
Adding munge and slashreplace method to windows package provider
to ensure successful installation of packages. Validation in the
type validate() not possible because we haven't chosen a provider
at that point. Outputs debug as a means of notifying the user that
the source has been changed.
|
|
adrienthebo/fixup/master/pup-2871-install-uninstall-options-pacman
Fixup/master/pup 2871 install uninstall options pacman
|
|
Prior to this commit there wasn't much verification for module dependencies.
This commit adds verification the module dependencies have sane names and version
ranges. If verification fails, it will raise an argument exception.
|
|
Prior to this commit when encountering a symlink in a module file during install,
the install would error out with No such file or directory - /path/to/symlink.
This is confusing and doesn't show what the problem actually is.
This commit modifies the installer behavior to check for any symlinks after the
module is extracted, give errors for each symlink it finds, and die. This will
hopefully help module authors track down the actual reason for the failed install
more easily.
|
|
Prior to this commit the build command would add symlinks to packages. This
can cause unexpected behavior when installed on a system.
This commit causes the build command to throw an error when it finds a symlink.
That should prevent new modules from being created with a symlink included.
|
|
These methods should not be called by any outside class; this commit
makes them private and removes the tests that invoke them directly.
|
|
In the same manner as 9137faf uninstall_options were being appended as a
nested array value; this commit changes the uninstall method to
concatentate options to the array.
|
|
Before this commit, install_options were passed as a nested array to
pacman/yaourt. This commit changes that to concatentate the values
with the argument vector.
|
|
Fix files with same comment after splitting models. The implementation
now points out that it uses the meta part and mixes in the
implementation.
The possible optimization logged in a ticket, and ticket is instead
referenced in the comments.
Manual inlining of accessor commented to avoid it being DRYed out.
|
|
|
|
Since all types now are PAnyType, there is no need to have
an extra abstratin called PAbstractType, it just adds level in
the ancestor hierarchy that needs to be consulted for methods, one
extra step to go when checking is_a? against PAbstractType instead of
PAnyType, etc.
|
|
This freezes all strings that are returned as tokens (varname,
sq and dq string, name, classref). Keywords were already frozen.
This optimizations means that these strings does not have to be frozen
later, and the values are faster to use as hash lookup without incurring
the penalty of again freezing (~10us per freeze call).
+ it is a sane thing to do anyway to avoid someone modifying the
strings.
|
|
The old (intermediate) lexer was still hanging around even if it was
not being used. Cycles were also wasted on unit testing it.
The new lexer "Lexer2" has been in use for quite some time and the
old lexer is not useful even as a reference at this point.
This speeds up both loading and unit testing.
|
|
Most of the changes are to call assignable_PIntegerType directly
when it is known that both sides are PIntegerType instead of calling
the polymorphic dispatch.
|
|
It is faster to compare :symbol == x than the other way around when the
x can be something other than a symbol (nil, string, integer) etc.
|
|
The Visitor2 class had an alternative method for making
polymorphic dispatch based on fact that calling a bound method
is faster than a send. The gain is however lost since bound methods
are instance specific and it is thus not possible to cache across
all instances. Using the Visitor2 also requires one extra step of setup.
Now that we have benchmarks, there was no improvement when using
Visitor2 over the regular Visitor, in fact there was a tendency for
Visitor2 to be slower (by ~1% in a couple of the runs).
This was expected, as polymorphic dispatching did not show up on the hot
list.
|
|
This makes a series of small changes in the evaluator logic.
replacing use of literal strings with frozen constants, choosing
a faster way to produce a string, to do a join etc.
Some of the optimizations also produce less garbage, but this is very
difficult to measure. Do not expect better micro benchmark results from
these changes.
|
|
The assert_rgen_installed() method is called from multiple sources,
and it did not check if an assert had already been made. This logic
was in the methods that called assert_rgen_installed().
This change moves the check if already asserted into the method
itself. This reduces the number of calls to require rgen, and the number
of rgen version compliance checks to 1.
|
|
|
|
This removes redundant checks for exported? and virtual? by calling
the underlying exported and virtual methods. There was no real reason
why it needed to check if methods exists before calling them.
|
|
|
|
|
|
This avoids a large number of calls to extract the type and title
from a resource ref.
|
|
This separates the three models for the language, types and
bindings into separate files for the meta part and the implementation.
This is done in anticipation of future changes / alternative ways of
generating the logic and working with models.
Now, when the runtime model is wanted, it loads the meta part and
then mixes in the implementation.
This also separates the dependencies between the models; now the
PopsObject from the language model is not reused in the other models.
|