microsoft / typespec

https://typespec.io/
MIT License
4.11k stars 197 forks source link

Disallow backslash (windows path) in cadl config #1261

Open timotheeguerin opened 1 year ago

timotheeguerin commented 1 year ago

Feel like there has been cases where this was done and caused issues.

Even though it could maybe work this make it always a bad experience having to escape \ and not being able to copy outside of windows. Think it would just be easier to force using / for paths in config.(Emit a diagnostic)

markcowl commented 1 year ago

est: 3

markcowl commented 1 month ago

Adding the breaking change label, as this could cause new diagnostics for existing specs

timotheeguerin commented 1 month ago

This was reverted as it applied to the CLI as well this is a problem https://github.com/microsoft/typespec/pull/4173

timotheeguerin commented 1 month ago

for this to work we need the cli to be able to resolve what emitter optins are ahead of time so it can call resolvePath to both resolve them relative to cwd and replace windows \