Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop when computing completion items in ADD and COPY if the build stage shares the name with the image #99

Closed
rcjsuen opened this issue Dec 7, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Dec 7, 2021

const lib = require("dockerfile-language-service")
const service = lib.DockerfileLanguageServiceFactory.createLanguageService();
service.computeCompletionItems("FROM a as a\nCOPY . . ", { line: 1, character: 9 });

This code will enter an infinite loop.

@rcjsuen rcjsuen added the bug Something isn't working label Dec 7, 2021
@rcjsuen rcjsuen self-assigned this Dec 7, 2021
@rcjsuen rcjsuen changed the title Infinite loop when computing completion items if the build stage shares the name with the image Infinite loop when computing completion items in ADD and COPY if the build stage shares the name with the image Dec 8, 2021
@rcjsuen
Copy link
Owner Author

rcjsuen commented Dec 8, 2021

Same thing happens for an ADD.

const lib = require("dockerfile-language-service")
const service = lib.DockerfileLanguageServiceFactory.createLanguageService();
service.computeCompletionItems("FROM a as a\nADD . . ", { line: 1, character: 8 });

@rcjsuen
Copy link
Owner Author

rcjsuen commented Dec 8, 2021

This is likely caused by rcjsuen/dockerfile-ast#100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant