Remove __rseed random value from XSLT-based compiler
This was used before __pkguniq to generate identifiers. Back then, I seemed to think determinism was a problem and that randomness was desirable for helping to ensure uniqueness between packages. That was a mistake; we _want_ a deterministic system (which is far easier to debug and verify the results of), we just want uniqueness. DEV-14965main
parent
418bd34005
commit
4e7d202d2d
|
@ -73,15 +73,6 @@
|
||||||
-->
|
-->
|
||||||
<param name="__relroot" />
|
<param name="__relroot" />
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Random value that may be used to seed random values
|
|
||||||
|
|
||||||
XSLT is deterministic and does not offer support for generating random values;
|
|
||||||
its generate-id() function is not sufficient for cross-package generation.
|
|
||||||
-->
|
|
||||||
<param name="__rseed" />
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
A package-unique string
|
A package-unique string
|
||||||
|
|
||||||
|
|
|
@ -55,13 +55,6 @@
|
||||||
|
|
||||||
<param name="stopshort" />
|
<param name="stopshort" />
|
||||||
|
|
||||||
<!-- should be provided externally -->
|
|
||||||
<if test="not( $__rseed ) or ( $__rseed = '' )">
|
|
||||||
<message terminate="yes">
|
|
||||||
<text>[preproc] error: missing random seed `__rseed'</text>
|
|
||||||
</message>
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<message>
|
<message>
|
||||||
<text>[preproc] *beginning macro expansion...</text>
|
<text>[preproc] *beginning macro expansion...</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -160,10 +160,6 @@ public class DslCompiler
|
||||||
new QName( "__relroot" ),
|
new QName( "__relroot" ),
|
||||||
XdmValue.makeValue( relroot )
|
XdmValue.makeValue( relroot )
|
||||||
);
|
);
|
||||||
t.setParameter(
|
|
||||||
new QName( "__rseed" ),
|
|
||||||
XdmValue.makeValue( (int)( Math.random() * 10e6 ) )
|
|
||||||
);
|
|
||||||
t.setParameter(
|
t.setParameter(
|
||||||
new QName( "__pkguniq" ),
|
new QName( "__pkguniq" ),
|
||||||
XdmValue.makeValue( _createPkgUniq( srcpkg ) )
|
XdmValue.makeValue( _createPkgUniq( srcpkg ) )
|
||||||
|
|
Loading…
Reference in New Issue