You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Titles are hard so let me elaborate:
When using the manual modules using exports and use, the blame labels are not correct when the server should be blamed (i.e. the module serving it's code). According to my own findings, the problem is with this check on line 514 in contracts.js: server = (toblame.isServer ? toblame : other);. When toblame is not a ModuleName, this will always result into other being the result in server.
The following gist is just created from the example you've given in the wiki page, with which I've experimented to confirm this bug. https://gist.github.com/froginvasion/7437702
A possible fix would be to set a ModuleName in use of a module instead of a plain string. I suppose that would be a good fix since use is theoretically called each time a module is 'imported'.
snippet:
//hoisted to top:
var mod;
//... rest of code
if(typeof orig.server === "string"){
mod = new ModuleName(orig.server,"",true);
} else {
mod = orig.server;
}
res[name] = orig.originalContract.check(orig.originalValue, mod, moduleName, []);
The text was updated successfully, but these errors were encountered:
Titles are hard so let me elaborate:
When using the manual modules using
exports
anduse
, the blame labels are not correct when the server should be blamed (i.e. the module serving it's code). According to my own findings, the problem is with this check on line 514 in contracts.js:server = (toblame.isServer ? toblame : other);
. Whentoblame
is not aModuleName
, this will always result intoother
being the result inserver
.The following gist is just created from the example you've given in the wiki page, with which I've experimented to confirm this bug.
https://gist.github.com/froginvasion/7437702
A possible fix would be to set a
ModuleName
inuse
of a module instead of a plain string. I suppose that would be a good fix sinceuse
is theoretically called each time a module is 'imported'.snippet:
The text was updated successfully, but these errors were encountered: