You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should reload the workspace when something in these files changes. Currently a reload has to be triggered by changing the build itself, e.g. reordering the keys in a list or removing one of the keys in the main object.
OUTDATED: Additionally, if imports is not set (as opposed to empty), we won't see any specs - what should happen instead is loading the entire workspace directory.
Update on the above: I don't think it makes any sense - we'd have to basically sift through all .smithy files in the workspace, then also add all .json files that happen to have a smithy member containing the language version (requires actually reading and parsing the files). I think a simpler solution for the time being will be to require an explicit imports list.
The text was updated successfully, but these errors were encountered:
so it doesn't take into account the files imported by the build definition. I don't think we should be watching arbitrary paths on disk though, so I'd say the fix for this would involve adding a file watcher for .smithy and .json files inside the workspace. (worth checking if Smithy tooling has support for any other alternate syntaxes but I think that's it).
This can be a separate PR as it doesn't break existing functionality - as long as it goes first.
Part 2:
Once the files are being watched, the handler of didChangeWatchedFiles needs to be made aware of these files. Currently isChanged is a property defined here:
BuildLoader[F].load only knows about the parsed contents of the build file, and it should stay that way. I think the right place to read & compare the files would be in ServerLoader still, and it should be based on a hash of the (recursive) contents of all files in params.config.imports.
We should reload the workspace when something in these files changes. Currently a reload has to be triggered by changing the build itself, e.g. reordering the keys in a list or removing one of the keys in the main object.
OUTDATED: Additionally, if
imports
is not set (as opposed to empty), we won't see any specs - what should happen instead is loading the entire workspace directory.Update on the above: I don't think it makes any sense - we'd have to basically sift through all .smithy files in the workspace, then also add all .json files that happen to have a
smithy
member containing the language version (requires actually reading and parsing the files). I think a simpler solution for the time being will be to require an explicit imports list.The text was updated successfully, but these errors were encountered: