summaryrefslogtreecommitdiff
path: root/tests/language-feature/modules
AgeCommit message (Collapse)Author
2024-06-10enable more metal tests (#4326)skallweitNV
2024-06-07Metal compute tests (#4292)skallweitNV
2024-03-08Parser and module finding logic fixes. (#3720)Yong He
* Fix parsing logic of `struct` decl. Fixes #3716. * Allow `loadModule` to find modules with underscores. * Fix test.
2024-02-20Language server robustness fix. (#3607)Yong He
* Language server robustness fix. * Allow parameter name to be the same as its type. * fix * Fix test.
2024-01-25Fixes for `module` and `include`. (#3519)Yong He
* Fix type checking of enum cases. * Allow decl to have same name as module. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-12-08Handle import, entrypoint and global params in included files. (#3395)Yong He
* Handle `import`, entrypoint and global params in included files. * Fix language server. * Extend `_createScopeForLegacyLookup` for `__include`. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-12-05Support `include` for pulling file into the current module. (#3377)Yong He
* Support `include` for pulling file into the current module. * Add auto-completion, hover info and goto-def support. * Disable warning for missing `module` declaration for now. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2021-06-06Include a "stack trace" with nested-import errors (#1872)T. Foley
* Include a "stack trace" with nested-import errors When errors occur in nested `#include` files it is often helpful to have a "stack trace" / traceback of the `#include` chain that led from a root translation unit to the file with an error. This change implements a similar feature for `import`s. It is worth noting that `import`s don't really *require* this kind of compiler support the way `#include`s do because the intention is that the meaning of an `import`ed file does not depend on the order or nesting of `import`s. As such, when trying to *fix* an error in an `import`ed file, you usually don't care how it came to be `import`ed into your shaders. The use case here is somebody adapting a large body of Slang code to use in a different codebase, such that they have certain `.slang` files they don't actually intend to have compile correctly, and they want to be able to diagnose how they came to include those files when/if they cause problems. The actual feature implementation is pretty simple because we already track a stack of active `import`s so that we can detect and diagnose recursive `import`s. This change simply changes the disagnostics when there is an error in imported code so that instead of just noting the inner-most `import` site it lists all the `import` sites that were active at the time. The change includes a test case to confirm that the behavior works (at least for the case of a parse error). * fixup: test outputs Co-authored-by: Yong He <yonghe@outlook.com> Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>