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
⚡ Feature: Multi-module support #31
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
deavmi
added
enhancement
New feature or request
help wanted
Extra attention is needed
labels
Aug 27, 2023
- Added `validate(string searchPath)` - Added `validate(string[] searchPaths)` - Added a constructor ModMan (unitests) - Added a positive unittest
- Added negative test case example
- Calling `defaultConfig()` will now add an entry of type `ARRAY` with key `modman:path` and the starting value is just an array with a single element being the current working directory
- Import `ModuleEntry` ModMan - Added `ModuleEntry` - Added `getModulesInDirectory(string directory, bool recurse = false)` which can resolve all the `ModuleEntry`(s) in a given directory (with optional recursion) - Added `search(string curModDir, string name, ref ModuleEntry found)` for searching for a module in a given directory (and then all search paths)
- If the compile-time flag of `DBG_MODMAN` is passed then only print debug text - Added support for recursing down and fixed how it is done in `getModulesInDirectory(string directory, bool recurse = false)`
- Store current module globally (not sure if we need to) - WIP: Work on module header name validation - Removed `findModulesFromStartingPath(string startingModulePath)` - Removed `findModulesInDirectory(string directory)` - Removed `slashToDot(string strIn)` ModuleManager - Added `isValidModuleDeclaration(string, string, string)` (still a work-in-progress) - Added `slashToDot(string strIn)`
- Updated testing files `a.t`, `b.t`, `z.t` and `niks/c.t`
- `defaultConfig()` now adds NOTHING to the default search path (just for now)
- The constructor now takes in an instance of the `Compiler` - Added new method `entries()` which calls `entries(string[])` with the given search paths from the compiler config entry but also tacks on the current working directory - Added `entriesWithInitial(string initialModulePath)` which, given a path to a module initially, will extract said module's containing directory and tack that onto the search paths and then call `entries(string[])` with that - Implemented `entries(string[])` which currently recurses down the given directories discovering all files that end with `.t` and of which have a module header (if not an error is thrown) and then creates a `ModuleEntry` per each mapping their absolute path to their skimmed-off module name - Added an `expect(SymbolType, Token)` so that we can throw `SyntaxError`'s (with a `null`-parser) - Added `skimModuleDeclaredName(string, ref string)` which skims the module's header for the module's name, setting it in the `ref`-based parameter if parsed correcttly, else returns `false` - (WIP) Made `isValidModuleDeclaration(string, string, string)` return `true`
- Fixed bug in `findAllTFilesShallow(string directory)` whereby we would never check `directory` to be a valid path nor even a path (if valid) to a directory - which is required in order to run `dirEntries(...)` on it
- Cleaned up the configuration code which initially creates the `ConfigEntry` for `modman:path`
- Yebop
- Added `ParseBase` mixin template, this contains the support for `--paths` command-line option - `compileCommand` now mixes in `ParseBase` and `TypeCheckerBase` and initializes the `ParseBaseInit()` as well - `parseCommand` now mixes in `ParseBase` and initializes the `ParseBaseInit()` as well - `typecheckCommand` now mixes in `ParseBase` and `TypeCheckerBase` and initializes the `ParseBaseInit()` as well
- Fixed bug in `validate(string searchPath)` which would not check if a path existed
- Updated to show use of extern variables
- Fixed missing `sourceFile` argument to various `Compiler` constructors - Fixed the module obtaining in one of the tests
- Removed old mapper
- Removed old mapper
- Removed old definition
- Documented
- Renamed
- Moved from `api.d` to `core.d`
- Documented - Cleaned up
- When generating `extern ...` statements for a given `Module` only tack on the `extern` to the emit if it is NOT `isExternal()` (if it is not a TLang externed variable/function). This is because those would already have them via the call to the signature generation function. This updates the `emitxterns(Module, File)` method. - When generating signatures for `Variable`(s) ensure that ones which have `isExternal()` return `true` have `extern ...` added to the front og the generated signature. This updates the `generateSignature_Variable(Variable var)` method.
- Cleaned up
Ready to merge ✔️ |
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.
Please see this.