You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there are cases where the JSON output of dub describe is prepended by various log messages. This is obviously an issue for any application that tries to parse the output, especially if there should be a "{" in the non-JSON prolog (fortunately not the case). To avoid this, the idea is to split up any non-describe operations, such as fetching missing dependencies into a separate step.
An IDE would then first issue something like dub describe --fetch-only or dub upgrade --missing-only, which will perform the necessary setup. Then it would call dub describe or dub describe --describe-only which outputs a single JSON document and nothing more. Failure to do the first step would then possibly output an error in the returned JSON output.
Note also the case of having JSON error messages for dependencies that don't exist at all, or for those that exist but the version requirements could not be matched.
The solution for now is this: Using dub upgrade --missing-only can be used before dub describe --nodeps to completely separate the describe operation from fetching dependencies. dub describe is now guaranteed to output only JSON for status code 0. For any other status code, the output will be a human readable error message.
Currently there are cases where the JSON output of
dub describe
is prepended by various log messages. This is obviously an issue for any application that tries to parse the output, especially if there should be a "{" in the non-JSON prolog (fortunately not the case). To avoid this, the idea is to split up any non-describe operations, such as fetching missing dependencies into a separate step.An IDE would then first issue something like
dub describe --fetch-only
ordub upgrade --missing-only
, which will perform the necessary setup. Then it would calldub describe
ordub describe --describe-only
which outputs a single JSON document and nothing more. Failure to do the first step would then possibly output an error in the returned JSON output.See also http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/1089/
The text was updated successfully, but these errors were encountered: