Skip to content

Commit 0eb3b94

Browse files
committed
Back out bdf6058 to disable P::RD grammar precompilation - until P::RD is fixed
While renewed activity on P::RD is great, the downside is that incompatible changes were introduced which render precompiled grammars useless. Furthermore since things are currently in the air it is very likely things will change yet again, hence just disable the whole thing for the time being. Reference RT#74593
1 parent 4df76cb commit 0eb3b94

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

Changes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
* All parser grammars are now precompiled for speed
21
* Fixes to SQLite foreign keys production (patch from Johan Viklund)
32
closes RT#16412, RT#44769
43
* ON DELETE/UPDATE actions for SQLite (patch from Lukas Thiemeier)

Makefile.PL

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ if ($Module::Install::AUTHOR) {
107107
WriteAll();
108108

109109
sub _recompile_grammars {
110+
return; # disabled until RT#74593 is resolved
111+
110112
require File::Spec;
111113

112114
my $compiled_parser_dir = File::Spec->catdir(qw/

lib/SQL/Translator/Utils.pm

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,25 @@ sub parse_dbms_version {
194194
}
195195
}
196196

197-
my ($parsers_libdir, $checkout_dir);
197+
#my ($parsers_libdir, $checkout_dir);
198198
sub ddl_parser_instance {
199+
199200
my $type = shift;
200201

201202
# it may differ from our caller, even though currently this is not the case
202203
eval "require SQL::Translator::Parser::$type"
203204
or die "Unable to load grammar-spec container SQL::Translator::Parser::$type:\n$@";
204205

206+
require Parse::RecDescent;
207+
return Parse::RecDescent->new(do {
208+
no strict 'refs';
209+
${"SQL::Translator::Parser::${type}::GRAMMAR"}
210+
|| die "No \$SQL::Translator::Parser::${type}::GRAMMAR defined, unable to instantiate PRD parser\n"
211+
});
212+
213+
# this is disabled until RT#74593 is resolved
214+
=begin for general sadness
215+
205216
unless ($parsers_libdir) {
206217
207218
# are we in a checkout?
@@ -259,6 +270,8 @@ sub ddl_parser_instance {
259270
}
260271
261272
return $precompiled_mod->new;
273+
=cut
274+
262275
}
263276

264277
# Try to determine the root of a checkout/untar if possible

t/60roundtrip.t

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,13 @@ my $plan = [
7070
parser_args => {},
7171
todo => 'Needs volunteers',
7272
},
73-
{
74-
engine => 'DB2',
75-
producer_args => {},
76-
parser_args => {},
77-
todo => 'Needs volunteers',
78-
},
73+
# too noisy under new P::RD
74+
# {
75+
# engine => 'DB2',
76+
# producer_args => {},
77+
# parser_args => {},
78+
# todo => 'Needs volunteers',
79+
# },
7980

8081
# There is no Access producer
8182
# {

0 commit comments

Comments
 (0)