-
Notifications
You must be signed in to change notification settings - Fork 191
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
Refactor & overhaul moonc and watchers #380
Open
Shados
wants to merge
9
commits into
leafo:master
Choose a base branch
from
Shados:overhaul-watchers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on May 12, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 6eaccf2 - Browse repository at this point
Copy the full SHA 6eaccf2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8e2bd4 - Browse repository at this point
Copy the full SHA a8e2bd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 925dc38 - Browse repository at this point
Copy the full SHA 925dc38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 36596eb - Browse repository at this point
Copy the full SHA 36596ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 011e3ec - Browse repository at this point
Copy the full SHA 011e3ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for d87acd2 - Browse repository at this point
Copy the full SHA d87acd2View commit details -
Move all path-related functions out from moonscript.cmd.moonc
- By 'path-related', I mean ones that purely manipulate or work on paths, with no actual filesystem accesses involved - A few new functions are also added
Configuration menu - View commit details
-
Copy full SHA for e1acafc - Browse repository at this point
Copy the full SHA e1acafcView commit details -
Improve and refactor bin/moonc code into moonscript.cmd.moonc
Benefits and changes: - Implemented the rsync-like exclusive/inclusive directory behaviour brought up in issue leafo#342 - Unified CLI file/directory input handling across watch and non-watch code paths - Everything works OK with absolute paths now, although I can't guarantee that it won't violate some user's expectations -- but the behaviour is all consistent - By converting moonc to Moonscript and breaking it up into smaller functions, it should be easier to read, and its component parts could also now be covered by the Busted tests - Also replaces the existing test filesystem stubs/mocks with some more expansive ones, in preparation for increasing test coverage
Configuration menu - View commit details
-
Copy full SHA for 42100ba - Browse repository at this point
Copy the full SHA 42100baView commit details -
Refactor moonc and overhaul watchers
- Essentially rewrote both SleepWatcher and InotifyWatcher - Added test suites for both, including an expanded set of filesystem stubs in order to test them in isolation from the underlying filesystem - The filesystem stubs have their own tests, kek Improvements as a result of these changes: - Watch mode will remove "orphaned" .lua output files if/when their corresponding .moon input files are deleted - But it will not remove .lua files that have no corresponding .moon file to begin with, in order to avoid e.g. removing vendored Lua modules - Both Watcher types will properly handle creation of new subdirectories - There *shouldn't* be any problematic races with this, although inotify's lack of recursive directory watching makes it difficult to know for sure - More of the code is tested, and more of the code now *could* be tested (but isn't yet) - Some bugs were fixed Downsides: - Somewhat gnarlier tests - Moar lines of code
Configuration menu - View commit details
-
Copy full SHA for 4764b21 - Browse repository at this point
Copy the full SHA 4764b21View commit details
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.