Skip to content

Java implementation's literalEval() is incomplete - breaks core functionality #197

@avinxshKD

Description

@avinxshKD

Hey

Was looking at the Java implementation (concoredocker.java) and noticed that the literalEval() method doesn't actually do anything:

private static Map<String, Object> literalEval(String s) {
    return new HashMap<>();
}

It just returns an empty HashMap regardless of input. This mean.......

  • parseFile() can't load iport/oport config files

  • params parsing always returns empty

  • read() can't parse incoming data from the workflow

  • defaultMaxTime() always falls back to default value since size() is 0

The Python version uses ast.literal_eval() and the C++ has mapParser(), so it's clearly supposed to work in Java too. Looks like this was left incomplete?

It needs to parse Python-style dict strings like {'edge1': 1, 'edge2': 2} and lists like [0.0, 1.5, 2.3].

Quick options i feel:

  1. Regex-based parser for the simple format concore uses
  2. Switch to JSON and use Jackson/Gson
  3. Document that Java support isn't complete yet

Not sure what the plan is but the current state means Java Docker containers won't work. Let me know if you want me to tackle this or if there's already an approach in mind.

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