GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — Inconsistent behavior with commented script parameters · Issue #398 · scijava/scijava-common Closed DescriptionWhen Consider the following Groovy scripts (all working as expected): /* * Some comment as header * (This script uses new-style parameter syntax) */ #@ String text #@ String text /* * (This script uses a new-style parameter, but at the beginning of the script) */ // @String text /* * (Old-style parameters will only be parsed at the very beginning of the code) */ Now, in the scripts using the new-style ( /* * The following parameter declaration will be ignored * because # is not at the beginning of the line */ // #@ String text // #@ String text /* * ^^^ ! * The above parameter matches the old-style syntax, even if both // and # are present */ We can probably change this to respect (and ignore) comments if and only if the script is using new-style syntax, by changing how we match the line when parsing old-style parameters here: scijava-common/src/main/java/org/scijava/script/process/ParameterScriptProcessor.java Line 143 in 3d64e2a
The question is if that would break any scripts in the wild that rely on the current behavior. There's definitely some scripts already that rely on commenting script parameters, but it would probably be ok to restore consistent behavior if the commented parameter occurs at the very beginning of the script. @ctrueden what's your opinion? NB: the behavior for Python is the same: ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |