qooxdoo-compiler
qooxdoo-compiler copied to clipboard
Error compiling file `url.replace is not a function`
Files with a comment such as // [Constructor] within the class definition fail to compile since 1.0.0-beta.20200320-1542 release
qx.Class.define("myapp.ui.myClass", {
extend: qx.ui.core.Widget,
// --------------------------------------------------------------------------
// [Constructor]
// --------------------------------------------------------------------------
construct: function()
Found the problem. You can now use markdown in your comments, [Constructor] is a markdown link tag which can not be parsed via Showdown Framework to an valid url. I will insert some error handling in the markdown cobersion calls.
Here is the PR: https://github.com/qooxdoo/qooxdoo-compiler/pull/634 Thanks for reporting!
Done with #634
Thanks for the quick fix!
It is reports that this is still happening, by the OP and by @level420
@level420
Markdown conversion error: "url.replace is not a function" found in ntrol.ImportList
[Constructor]
@level420 Well I've stripped the file down to
qx.Class.define("my.application.control.ImportList",
{
extend : my.application.control.EditableList,
members :
{
/**
* Create an editor instance
*
* @return {Object}
*/
_createEditorInstance : function() {
return null;
}
}
});
and still get the message. If I remove the doc/comment like this:
qx.Class.define("my.application.control.ImportList",
{
extend : my.application.control.EditableList,
members :
{
_createEditorInstance : function() {
return null;
}
}
});
it's gone.
@derrell : I can not reproduce this with test cases. Could you create a small example project?
@hkollmann, to reproduce, replace the line comments in the original example to a block comment
qx.Class.define("myapp.ui.myClass", {
extend: qx.ui.core.Widget,
/**
* --------------------------------------------------------------------------
* [Constructor]
* --------------------------------------------------------------------------
*/
construct: function()
[Constructor] is the problem since we use markdown in comments. This is an invalid link. So the message is correct. It should be a warning and try to use the text without markdown support
It should be a warning, however the current output is somehow garbled and repeated and indication to the position of the problem in the source is currently not working:
qx compile --clean
Markdown conversion error: "url.replace is not a function" found in irtual
[Constructor]
Markdown conversion error: "url.replace is not a function" found in
[Constructor]
Markdown conversion error: "url.replace is not a function" found in
[Constructor]
In the above output, there is only one instance of this invalid url and the file was called UploadForm.js