Skip to content

Some hidden characters cause the CLI compilation to fail, and also breaks the language-server #99

@kittaakos

Description

@kittaakos

Describe the bug

Try to compile the attached sketch, it fails:

arduino-cli compile -b arduino:avr:nano ./mysketch
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:11:1: error: stray '\342' in program
 ???
 ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:11:2: error: stray '\200' in program
 ???
  ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:11:3: error: stray '\213' in program
 ??
   ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:13:1: error: stray '\342' in program
 ???
 ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:13:2: error: stray '\200' in program
 ???
  ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:13:3: error: stray '\213' in program
 ??
   ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:28:1: error: stray '\342' in program
 ???
 ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:28:2: error: stray '\200' in program
 ???
  ^
/Users/akos.kitta/Desktop/mysketch/mysketch.ino:28:3: error: stray '\213' in program
 ??
   ^
Error during build: exit status 1

It also breaks the language server:

Screen Shot 2020-09-02 at 12 20 37

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions