LiveRamp / reslang

A language for describing resource-oriented APIs & turning them into Swagger or resource diagrams. Oriented around the concepts we want to expose in the APIs.
Apache License 2.0
23 stars 7 forks source link

reslang docker image seems defective or out of date #117

Closed j-q-arnold closed 3 years ago

j-q-arnold commented 4 years ago

I am using the latest reslang (pulled to be sure), and the packaged docker image: reslang-docker.sh. The following problem occurs.

$ bash ~/code/reslang/reslang-docker.sh /Users/jaarno/code/api-specs/specs-draft/segment-delivery --diagram deliveries \
        --stdout >/Users/jaarno/code/api-specs/specs-draft/segment-delivery/generated-sources/deliveries.dot
This only accepts absolute paths e.g. /User/a/b/models/
Reslang files to read: /Users/jaarno/code/api-specs/specs-draft/segment-delivery
/app/reslang/segment-delivery
Warning: Failed to copy to clipboard undefined

Things to note:

njaczko commented 4 years ago

It turns out the reslang-docker.sh script does not pass any options to the reslang container besides --stdout (which it always passes, hardcoded).

The script should definitely either pass the options, or error if options are passed. README.md does not clearly describe the limitations of reslang-docker.sh either.

Also, I agree that the other output about absolute paths and clipboard is confusing.

I'll check in with the rest of the team - we're still figuring out how we're going to prioritize bug fixes...

cjea commented 3 years ago

Addressed in https://github.com/LiveRamp/reslang/pull/140

Looks like the script was ignoring any user-specified options. Also note that 2>/dev/null removes the clipboard error (which pops up even with --stdout...).

@j-q-arnold If you try the updated script from the PR above, let me know if it works correctly for you. Testing it locally looks good to me

j-q-arnold commented 3 years ago

CJ,

The diagram works now. Thanks. It does still emit an error message about the clipboard, as noted in the original issue. I'll claim that redirecting stderr (2>/dev/null) is not really a fix for the error message. But I'm happy the diagram works.

Jim Arnold

On Tue, Oct 13, 2020 at 3:38 PM CJ Apel notifications@github.com wrote:

Addressed in #140 https://github.com/LiveRamp/reslang/pull/140

Looks like the script was ignoring any user-specified options. Also note that 2>/dev/null removes the clipboard error (which pops up even with --stdout...).

@j-q-arnold https://github.com/j-q-arnold If you try the updated script from the PR above, let me know if it works correctly for you. Testing it locally looks good to me

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LiveRamp/reslang/issues/117#issuecomment-708047021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYB46HJ53BYZ6CMXZUCD63SKTJETANCNFSM4R4TPFNQ .

cjea commented 3 years ago

I'll claim that redirecting stderr (2>/dev/null) is not really a fix for the error message

Completely agree. It's just a workaround for the time being. I'll try to get reslang to stop copying to clipboard when --stdout is specified.