Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing declarations to be placed after other things of current scope #48

Merged
merged 16 commits into from Mar 27, 2018

Conversation

TimSPb89
Copy link
Contributor

@TimSPb89 TimSPb89 commented Feb 27, 2018

An Issue

There are some scripts featured in production that use Declarations after Calls or other things of current scope. It causes pipeline-builder to throw an Error (Context initialization failed due to WDLParserError: Declarations are allowed only before other things of current scope).

This PR resolves this issue.

@coveralls
Copy link

coveralls commented Feb 27, 2018

Coverage Status

Coverage increased (+0.4%) to 97.58% when pulling 7542e46 on fix_declarations-before-other-things-only into f2ee5de on dev.

…or: Undeclared call is referenced: 'Utils_ConvertToCram'" when calling 'call ns.name as name'
* added Declaration instance to model
* knowing inputs & declarations apart
* declarations in blocks aren't causing app to crash
* added VisualDeclaration instance
* visualization for Declarations was added to Visualizer
* added links expression types like 'FunctionCall', 'ArrayOrMapLookup', 'ArrayLiteral' and so on
* changed links type
* fixed eslint error 'class-method-use-this'
* the imports resolving feature was updated according to the new declarations
@vpolyakov88
Copy link

vpolyakov88 commented Mar 16, 2018

PNG button doesn't work

22491d0
Steps to reproduce:

  1. npm install
  2. gulp serve
  3. Open app in chrome
  4. Click "To png" button

Expected result: picture of the scheme below is downloaded
Actua result: Nothing happens

Comments:
The same problem with any script scheme

@vpolyakov88
Copy link

vpolyakov88 commented Mar 16, 2018

Update

This behaviour is expected

Unexpected task name is displayed

22491d0
Steps to reproduce

  1. npm install
  2. gulp serve
  3. Open app in chrome
  4. Paste in "Paste your .wdl script here:" field a script that has an "if" pattern as follows: import "URL" as myImport.
  5. Click "Build" button
  6. Look at the "if" in the scheme

Expected result: "if" block has name "myOtherWorkflow"
Actua result: "if" block has name "workflow myImport.myOtherWorkflow as myOtherWorkflow"
image

Comments:
If the file is not imported the same situation does not occur.

You can observe it if use this script

@vpolyakov88
Copy link

vpolyakov88 commented Mar 19, 2018

[Fixed] Console error if user build script

8e9fb41
Steps:

  1. run PB
  2. open browser console
  3. build attached script (link)
    exp.: the diagram is displayed
    act.: error in the console has appeared

app.js:67 Uncaught (in promise) Error: Context initialization failed due to WDLParserError: Undeclared call is referenced: 'normal_bam_and_bai' at app.js:67 at <anonymous>

@TimSPb89 TimSPb89 merged commit d6c59c3 into dev Mar 27, 2018
@TimSPb89 TimSPb89 deleted the fix_declarations-before-other-things-only branch March 27, 2018 15:58
@TimSPb89 TimSPb89 mentioned this pull request Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants