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

Load all modules after first build #227

Merged
merged 3 commits into from
May 16, 2020

Conversation

akash-akya
Copy link
Contributor

Closes #209

The test contains sleep as the build is async. I'm not sure about sleep duration. Let me know if there is a better way to test this

@akash-akya akash-akya force-pushed the fix-project-loading branch from 43420e7 to cadd374 Compare April 28, 2020 18:41
initialize(server)

# Upon first vist, server complies and loads all umbrella applications and modules
Process.sleep(1_500)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the server process is handling a message, then simply calling :sys.get_state will make the calling process block until the server process is ready. If the server is waiting for an async message from other process you can call :sys.get_state in a loop with short sleeps until the state returned indicates that async task is completed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. I'll will try to update test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated, please check

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks good

Copy link
Member

@axelson axelson left a comment

Choose a reason for hiding this comment

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

This is great, thanks! ❤️

@axelson axelson merged commit 6ddcd32 into elixir-lsp:master May 16, 2020
axelson added a commit that referenced this pull request May 16, 2020
axelson added a commit that referenced this pull request May 29, 2020
* WorkspaceSymbols index after successful build

Previously WorkspaceSymbols depended on a side-effect of running Dialyzer:
#110 (comment)

Now that the Build step loads all modules (added in #227) we need to change the
WorkspaceSymbols index to be rebuilt after a successful compile.

* Fix tests

Allow WorkspaceSymbol to have it's own instance of the GenServer for the test by
being parameterized by the server's registered name

* Give Server some more time to respond

This is probably necessary now because workspace symbols is running earlier

* Bump up the timeout
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.

Issue with auto-completion when dialyzer is disabled for an umbrella app
3 participants