rcjsuen / dockerfile-language-service

Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.
MIT License
16 stars 2 forks source link

Hovers do not resolve properly for uninitialized ARG variables that share the same with one at the top of a Dockerfile #34

Closed rcjsuen closed 6 years ago

rcjsuen commented 6 years ago

Hovering over $ver on the fourth line does not give latest.

ARG ver=latest
FROM busybox:$ver
ARG ver
RUN echo $ver
$ docker build .
Sending build context to Docker daemon  1.693MB
Step 1/4 : ARG ver=latest
Step 2/4 : FROM busybox:$ver
latest: Pulling from library/busybox
f70adabe43c0: Pull complete
Digest: sha256:58ac43b2cc92c687a32c8be6278e50a063579655fe3090125dcb2af0ff9e1a64
Status: Downloaded newer image for busybox:latest
 ---> 8ac48589692a
Step 3/4 : ARG ver
 ---> Running in af5ced8a8d4c
Removing intermediate container af5ced8a8d4c
 ---> 0a3042e16719
Step 4/4 : RUN echo $ver
 ---> Running in a74c14da9ae4
latest
Removing intermediate container a74c14da9ae4
 ---> 370fcb2b140c
Successfully built 370fcb2b140c
rcjsuen commented 6 years ago

rcjsuen/dockerfile-ast#26 has been fixed. Will need to adopt that fix and see if anything else needs to be done on this side.

rcjsuen commented 6 years ago

Blocked by rcjsuen/dockerfile-ast#42 now.

rcjsuen commented 6 years ago

Now blocked by rcjsuen/dockerfile-ast#44. :(