rabix / composer

Visual and code editor for Common Workflow Language
http://rabix.io/
Apache License 2.0
301 stars 72 forks source link

Saving a tool id with dashes changes its id #417

Open pkerpedjiev-zymergen opened 5 years ago

pkerpedjiev-zymergen commented 5 years ago

Steps to reproduce

Let's say I have a tool with a CWL id of bwa--mem--0.7.17:

id: bwa--mem--0.7.17

If I open that tool in Rabix Composer, the double dashes will be converted to spaces:

image

I use Rabix Composer to change to something unrelated like the description and save the tool.

Observed

When I open the CWL file, its ID is now something different:

id: bwa_mem_0_7_17

Expected

I would expect the ID of the tool to remain as it was before I edited the unrelated field in Rabix. It should remain bwa--mem--0.2.17 and not change to bwa_mem_0_7_17.

ghost commented 5 years ago

@pkerpedjiev-zymergen thank you for the report. I can reproduce and this is indeed unacceptable behavior. We will fix this in 1.1.0. We'll ping here in this report as soon as it gets to the master branch.

ghost commented 5 years ago

@marijanlekic The general pattern is

a-b -> a_b 

I wonder if it has something to do with our name mangling for duplicate ids.

ghost commented 5 years ago

@pkerpedjiev-zymergen after a brief discussion on the CWL gitter I was pointed to a tightening up of the CWL specification that is imminent (in 1.1). In common-workflow-language/common-workflow-language#429 we plan to only allow ids that form valid javascript without quoting. This will mean no dashes and spaces amongst other things.

We will improve the RC documentation to reflect this. We could use this ticket to discuss the proper behavior for RC when a user types in an invalid id in the code pane.