Skip to content

Bugs found trying to translate toxiclibs #26

Open

Description

@stuaxo

I thought I'd point java2python at toxiclibs and see what happens, unfortunately it gets stuck:

# hg clone https://bitbucket.org/postspectacular/toxiclibs

ToneMap https://bitbucket.org/postspectacular/toxiclibs/src/689ddcd9bea39d1f8dddad26e971ae4c12b1198e/src.color/toxi/color/ToneMap.java?at=default

Triggers ValueError: list.remove(x): x not in list


# j2py src.color/toxi/color/ToneMap.java
Traceback (most recent call last):
  File "/home/stu/.virtualenvs/tmp/bin/j2py", line 7, in <module>
    execfile(__file__)
  File "/home/stu/.virtualenvs/tmp/src/java2python/bin/j2py", line 259, in <module>
    sys.exit(runMain(configScript(sys.argv[1:])))
  File "/home/stu/.virtualenvs/tmp/src/java2python/bin/j2py", line 57, in runMain
    return runOneOrMany(options)
  File "/home/stu/.virtualenvs/tmp/src/java2python/bin/j2py", line 83, in runOneOrMany
    return runTransform(options)
  File "/home/stu/.virtualenvs/tmp/src/java2python/bin/j2py", line 128, in runTransform
    transformAST(tree, config)
  File "/home/stu/.virtualenvs/tmp/src/java2python/java2python/compiler/__init__.py", line 37, in transformAST
    call(node, config)
  File "/home/stu/.virtualenvs/tmp/src/java2python/java2python/mod/transform.py", line 96, in lengthToLen
    raise e
ValueError: list.remove(x): x not in list


ColorList generates invalid syntax -

ColorList.#      * Creates a deep copy of the given ColorList. Manipulating the new list or

# WARNING runTransform: Generated source has invalid syntax. expected an indented block (<string>, line 117)

Activity

  1. hobson commented on Apr 22, 2014

    @hobson

    similar errors trying to j2py https://github.com/ggp-org/ggp-base

    we need to define translation rule for <string> java syntax

  2. DisDoh commented on Nov 9, 2019

    @DisDoh

    And for ArrayList

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions