-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Remove trailing colon when parsing the protocol from URL #1778
Conversation
I tested it on Windows and #1775 is fixed as expected. |
I have little experience of typescript. If my code style in this PR is not good, please tell me how to improve it. Thanks. |
The code changes look good to me. When I set and use the SOCKS scheme in the I noticed the following, however: Use these settings: IDE2 will send the following config object to the CLI: {
"board_manager": {
"additional_urls": [
"https://arduino.esp8266.com/stable/package_esp8266com_index.json"
]
},
"daemon": {
"port": "50051"
},
"directories": {
"data": "/Users/a.kitta/Library/Arduino15",
"user": "/Users/a.kitta/Documents/Arduino"
},
"library": {
"enable_unsafe_install": false
},
"locale": "en",
"logging": {
"file": "",
"format": "text",
"level": "info"
},
"metrics": {
"addr": ":9090",
"enabled": true
},
"output": {
"no_color": false
},
"sketch": {
"always_export_binaries": false
},
"updater": {
"enable_notification": true
},
"network": {
"proxy": "http://username:pwd@alma:1234/"
}
} The updated CLI config will be this: board_manager:
additional_urls:
- https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon:
port: "50051"
directories:
builtin:
libraries: /Users/a.kitta/Library/Arduino15/libraries
data: /Users/a.kitta/Library/Arduino15
downloads: /Users/a.kitta/Library/Arduino15/staging
user: /Users/a.kitta/Documents/Arduino
library:
enable_unsafe_install: false
locale: en
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
network:
proxy: socks://username:pwd@my_hostname:3636
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true When I use the HTTP scheme in the The IDE2 will send the following config JSON to the CLI: {
"board_manager": {
"additional_urls": [
"https://arduino.esp8266.com/stable/package_esp8266com_index.json"
]
},
"daemon": {
"port": "50051"
},
"directories": {
"data": "/Users/a.kitta/Library/Arduino15",
"user": "/Users/a.kitta/Documents/Arduino"
},
"library": {
"enable_unsafe_install": false
},
"locale": "en",
"logging": {
"file": "",
"format": "text",
"level": "info"
},
"metrics": {
"addr": ":9090",
"enabled": true
},
"network": {
"proxy": "http://u:p@host:2345/"
},
"output": {
"no_color": false
},
"sketch": {
"always_export_binaries": false
},
"updater": {
"enable_notification": true
}
} But the CLI config YAML will be this: board_manager:
additional_urls:
- https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon:
port: "50051"
directories:
builtin:
libraries: /Users/a.kitta/Library/Arduino15/libraries
data: /Users/a.kitta/Library/Arduino15
downloads: /Users/a.kitta/Library/Arduino15/staging
user: /Users/a.kitta/Documents/Arduino
library:
enable_unsafe_install: false
locale: en
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
network:
proxy: http://u:p@host:2345/
user_agent_ext: daemon
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true 👆 Note the additional I have also noticed when switching from either SOCK or HTTP proxy to no proxy config, the CLI config does not update correctly. The Have this IDE2 sends this CLI config JSON to CLI: {
"board_manager": {
"additional_urls": [
"https://arduino.esp8266.com/stable/package_esp8266com_index.json"
]
},
"daemon": {
"port": "50051"
},
"directories": {
"data": "/Users/a.kitta/Library/Arduino15",
"user": "/Users/a.kitta/Documents/Arduino"
},
"library": {
"enable_unsafe_install": false
},
"locale": "en",
"logging": {
"file": "",
"format": "text",
"level": "info"
},
"metrics": {
"addr": ":9090",
"enabled": true
},
"network": {},
"output": {
"no_color": false
},
"sketch": {
"always_export_binaries": false
},
"updater": {
"enable_notification": true
}
} But the CLI YAML will be this: board_manager:
additional_urls:
- https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon:
port: "50051"
directories:
builtin:
libraries: /Users/a.kitta/Library/Arduino15/libraries
data: /Users/a.kitta/Library/Arduino15
downloads: /Users/a.kitta/Library/Arduino15/staging
user: /Users/a.kitta/Documents/Arduino
library:
enable_unsafe_install: false
locale: en
logging:
file: ""
format: text
level: info
metrics:
addr: :9090
enabled: true
network:
proxy: http://uname:korte@hostname:4567/
user_agent_ext: daemon
output:
no_color: false
sketch:
always_export_binaries: false
updater:
enable_notification: true The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have verified the changes and confirm that it fixes #1775. When I configure the socks
protocol in the Settings
> Network
tab, I have the expected socks://username:pwd@hostname:port
construct in the ~/.arduinoIDE/arduino-cli.yaml
file.
Thank you for the help!
FYI: If one starts the IDE2 from the console, the actual CLI config JSON object is dumped when saving the |
I guess we need to start a new issue to resolve the problems you find in #1778 (comment)? |
It's helpful. Thanks. |
Thanks for your prompt reaction. Yes, we will take care of the follow-ups, and it does not affect this PR. No action is required (unless you want to start working on the other bugs 😉, but they need to be confirmed first.) |
This bug is tracked at arduino/arduino-cli#1677 |
Motivation
This PR should fix #1775
Change description
Remove the trailing colon when parsing the protocol in URL string
Other information
Reviewer checklist