Menu

#723 Bug in semicolon separated expressions

v1.1.x
fixed
v1.1.3
Bug Fix
2022-09-18
2022-08-05
Erik Hänel
No

If one tries to execute s.th. like the following, a strange error occurs:

sVersion = #version();;sVersion = sVersion.at(1) + "." + sVersion.at(2) + "." + sVersion.sub(3)

If one adds a single whitespace on front of the ;;, the error disappears. Sequences like those are created by dragging multiple lines into the terminal.

Analysis:

Those are two problems. The first one is the duplicate ;;, which is resolved quite easily in the drag'n drop handler. The second problem is the error itself. The analysis yields that this is due to the # for string conversion. The handler for splitting the ; in multiple expressions obviously does not handle the # correctly and probably misinterprets that as beginning of a string literal.

Implementation:

  • Implementation: Implemented as proposed by the analysis.
  • Revision: [r1201]
  • Implementation test: The erroneous expression was executed without deviation.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [ ] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [x] not needed
  • Language files:
    • [ ] corresponding language files updated
    • [x] not needed

Tests:

Repeated the erroneous expression and checked the drag 'n drop handler in different scenarios. No deviation detected.

Related

Commit: [r1201]

Discussion

  • Erik Hänel

    Erik Hänel - 2022-08-08
    • labels: --> internal, terminal
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2022-08-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,3 +3,25 @@
         sVersion = #version();;sVersion = sVersion.at(1) + "." + sVersion.at(2) + "." + sVersion.sub(3)
    
     If one adds a single whitespace on front of the `;;`, the error disappears. Sequences like those are created by dragging multiple lines into the terminal.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2022-08-11
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,7 +5,7 @@
     If one adds a single whitespace on front of the `;;`, the error disappears. Sequences like those are created by dragging multiple lines into the terminal.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +Those are two problems. The first one is the duplicate `;;`, which is resolved quite easily in the drag'n drop handler. The second problem is the error itself. The analysis yields that this is due to the `#` for string conversion. The handler for splitting the `;` in multiple expressions obviously does not handle the `#` correctly and probably misinterprets that as beginning of a string literal.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2022-08-12
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,20 +8,20 @@
     Those are two problems. The first one is the duplicate `;;`, which is resolved quite easily in the drag'n drop handler. The second problem is the error itself. The analysis yields that this is due to the `#` for string conversion. The handler for splitting the `;` in multiple expressions obviously does not handle the `#` correctly and probably misinterprets that as beginning of a string literal.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented as proposed by the analysis.
    +* Revision: [r1201]
    +* Implementation test: The erroneous expression was executed without deviation.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
         * [ ] corresponding language files updated
    -    * [ ] not needed
    +    * [x] not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r1201]

  • Erik Hänel

    Erik Hänel - 2022-09-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -24,4 +24,4 @@
    
         * [x] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Repeated the erroneous expression and checked the drag 'n drop handler in different scenarios. No deviation detected.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB