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

Initialize CSX file watcher also when no CSX files are available at startup #1210

Merged
merged 8 commits into from
Jun 5, 2018

Conversation

filipw
Copy link
Member

@filipw filipw commented Jun 1, 2018

Fixes #1199
At the moment we only initialized CSX file watcher (reacting to new or removed files) when there were any CSX files discovered at startup, which was mentioned and discussed in #1199

This PR fixes that, and we also listen when no CSX files are available at startup, so as soon as you add your first one, language services light up.
This whole change would have been a single line https://github.com/OmniSharp/omnisharp-roslyn/compare/master...filipw:bugfix/1199?expand=1#diff-ed5a3c116a19423c18b1e630f80455b9R70 but I took a liberty to rationalize some of the code around scripting.

For example renamed ScriptHelper to ScriptProjectProvider, and extracted a ScriptContext and ScriptContextProvider from the spaghetti project system. While this made the diff rather big (sorry), it shouldn't affect anything.

Finally, ignored the ordering on one of the flaky tests (#1193 (review)) and added a test for this new watching feature.

…not provided if no CSX files existed at the moment OmniSharp was started
CHANGELOG.md Outdated
@@ -1,6 +1,9 @@
# Changelog
All changes to the project will be documented in this file.

## [1.32.0] - not yet released
* Fixed a bug where lanugage services for newly created CSX files were not provided if no CSX files existed at the moment OmniSharp was started ([#1199](https://github.com/OmniSharp/omnisharp-roslyn/issues/1199), PR: [#1210](https://github.com/OmniSharp/omnisharp-roslyn/pull/1210))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "lanugage" -> "language"


namespace TestUtility
{
public class DisposableFile : IDisposable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything here that can be shared with the code in TestProject?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, I think I will remove this completely, and instead allow a new file to be added to an existing TestProject. If the project was shadowcopied, the file will disappear with it, and it if it wasn't we will delete it during the disposal of TestProject. This will keep all I/O clean up operations in TestProject which is our unit of work in these tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working with *.csx and intellisense is messing up
2 participants