-
Notifications
You must be signed in to change notification settings - Fork 104
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
Make Module Documentation Available #1281
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change how tabs are loaded to allow the passing of the ReactDOM to tabs
Updating tests to fit the tab file syntax
Fixed lodash memoization
eslint formatting
js-slang can now load documentation for modules to display them in the prompts used by the ace editor
Ran eslint
Added support for module variables' documentation
Ran eslint
The generated documentation will now more closely follow the format as given by the builtins
Ran eslint
Built documentations are now formatted appropriately and do not need to be parsed by js-slang
Added failure message for when documentation fails to load
Makes no sense for tabs to be edited every time they are loaded.
Fixed tests
If there are errors while loading documentation, the user won't constantly get lagged out by js-slang trying to reach the module server again and again
Pull Request Test Coverage Report for Build 3068335363
💛 - Coveralls |
This was referenced Aug 6, 2022
This pull request introduces 1 alert when merging 3e7c274 into ed3b88d - view on LGTM.com new alerts:
|
If you try using namespace imports with fullJS it won't lag your editor with errors anymore
martin-henz
approved these changes
Sep 16, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With reference to this PR, there are two changes to js-slang:
Added a new
loadModuleDocs
function. Currently, unlike the other load functions, this function returnsnull
and logs to the console if there are errors loading the documentation instead of throwing that error. This is to prevent a request being made to the modules server every time the user presses a key in the editor, resulting in significant lag.Raw tab files are no longer processed by js-slang. Instead, they are evaluated directly and passed to the frontend. The corresponding tests have been modified.
Also made the documentation for some of the name parsing code a bit clearer.