Skip to content

Feature flags #1715

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

Merged
merged 2 commits into from
Aug 22, 2019
Merged

Feature flags #1715

merged 2 commits into from
Aug 22, 2019

Conversation

matklad
Copy link
Member

@matklad matklad commented Aug 22, 2019

No description provided.

@matklad
Copy link
Member Author

matklad commented Aug 22, 2019

bors r+

bors bot added a commit that referenced this pull request Aug 22, 2019
1715: Feature flags r=matklad a=matklad



Co-authored-by: Aleksey Kladov <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 22, 2019

Build failed

@matklad
Copy link
Member Author

matklad commented Aug 22, 2019

bors r+

bors bot added a commit that referenced this pull request Aug 22, 2019
1715: Feature flags r=matklad a=matklad



Co-authored-by: Aleksey Kladov <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 22, 2019

Build failed

@matklad
Copy link
Member Author

matklad commented Aug 22, 2019

bors r+

bors bot added a commit that referenced this pull request Aug 22, 2019
1715: Feature flags r=matklad a=matklad



Co-authored-by: Aleksey Kladov <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 22, 2019

Build failed

@matklad
Copy link
Member Author

matklad commented Aug 22, 2019

bors r+

bors bot added a commit that referenced this pull request Aug 22, 2019
1715: Feature flags r=matklad a=matklad



Co-authored-by: Aleksey Kladov <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 22, 2019

Build succeeded

@bors bors bot merged commit 69bbe79 into master Aug 22, 2019
@bors bors bot deleted the feature-flags branch August 22, 2019 12:25
@kjeremy
Copy link
Contributor

kjeremy commented Aug 22, 2019

Should we be using workspace/Configuration for this?

@matklad
Copy link
Member Author

matklad commented Aug 22, 2019

Quite likely!

I haven't yet fully understood how configuration is supposed to work with LSP, so I just pile additional stuff onto the thing we have

@@ -587,17 +602,20 @@ fn update_file_notifications_on_threadpool(
subscriptions: Vec<FileId>,
) {
log::trace!("updating notifications for {:?}", subscriptions);
let publish_diagnostics = world.feature_flags().get("lsp.diagnostics");
pool.execute(move || {
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't you do a pre-spawn condition check whether this will actually do something? This is in the main thread and loop, and maybe we don't even do something, yet we spawn a useless thread (iterating over files for nothing)?

Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn’t spawn a thread, just sends a closure over a channel, it”s only a constant amount of work, comparable to the work we need to get to this point in the first place.

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.

3 participants