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

Remapping of escape character not handled #245

Closed
paulcallen opened this issue Apr 5, 2018 · 11 comments
Closed

Remapping of escape character not handled #245

paulcallen opened this issue Apr 5, 2018 · 11 comments
Assignees
Labels

Comments

@paulcallen
Copy link

paulcallen commented Apr 5, 2018

put this at the top of a docker file: # escape=`

and it remaps the escape character such that windows file paths can exist as c:\foo. Really nice feature.
Unfortunately this plug-in does not recognize this and as a result it thinks \f is an invalid escape sequence.

@rcjsuen
Copy link
Contributor

rcjsuen commented Apr 6, 2018

@paulcallen Hi, could you attach a screenshot and your Dockerfile to more clearly identify what the problem is?

@paulcallen
Copy link
Author

paulcallen commented Apr 6, 2018

capture

looks like it is for quoted strings as I have other paths that do not show an error,

@thomashillyer
Copy link

I think this is the same as issue #75

@rcjsuen
Copy link
Contributor

rcjsuen commented Jun 18, 2018

@thomashillyer I don't think that's quite the same. I feel like #75 is a parsing issue with quotes and backslashes whereas this #245 is due to the parser not being capable of reading Dockerfile's escape parser directive (understandably so in my opinion).

@thomashillyer
Copy link

@rcjsuen but presumably if the Dockerfile's escape parser was read then the issue in #75 would also be solved because backslashes wouldn't be treated as escape characters

I suppose then the issue arises when someone wants to use the backslash as an escape character in a command they are running

@rcjsuen
Copy link
Contributor

rcjsuen commented Jun 18, 2018

@thomashillyer Yeah, you basically need a way to tell the grammar when you're in some RUN instruction or not for #75. I'm assuming that's not trivial or even possible to describe.

For this issue #245 you need a way to teach the grammar about Dockerfile escape parser directives. That sounds equally difficult and non-standard for a grammar but I could be wrong...

@StephenWeatherford
Copy link
Contributor

It's not clear how many people this is affecting. Is it blocking people?

@paulcallen
Copy link
Author

not blocking for me. It was more of an fyi for you. if it is easy to fix then go for it, if not then that is fine also,

@dcormier
Copy link

I have this problem. It's definitely frustrating, but, as it doesn't not actually prevent editing the file, I wouldn't classify it as blocking for me. It just completely breaks syntax highlighting.

@StephenWeatherford
Copy link
Contributor

From a quick look it doesn't look like this would be very easy, but not an expert in g4. If someone wants to give it a shot, go for it!

@bwateratmsft
Copy link
Collaborator

I filed microsoft/vscode#82985 and will close this issue as external.

@bwateratmsft bwateratmsft removed this from the Future milestone Oct 21, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants