-
Notifications
You must be signed in to change notification settings - Fork 12
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
modules: find module with TT_CLI_MODULES_PATH #1036
Conversation
7c49c4d
to
f083b8d
Compare
75a1aec
to
f1140af
Compare
f083b8d
to
0e6bfb6
Compare
b36ea67
to
ca819e3
Compare
0e6bfb6
to
1b8ed5e
Compare
ca819e3
to
7db5343
Compare
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.
Please, add a description to the commit messages, see:
It will help to notify a doc team about changes.
1b8ed5e
to
ff7da90
Compare
7db5343
to
32f96aa
Compare
32f96aa
to
b8a7313
Compare
ff7da90
to
465cc24
Compare
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.
We can't break backward compatibility. So old tests should work.
2378be6
to
7d17211
Compare
7d17211
to
288d595
Compare
288d595
to
95a94bb
Compare
71fc957
to
8d60a6a
Compare
95a94bb
to
db292f8
Compare
Closes #1013 @TarantoolBot document Title: Use environment variable to find modules. The TT_CLI_MODULES_PATH environment variable specifies a list of module's paths separated by a colon “:”. It can be set externally from tt and must contain a list of folders where modules are located. The logic of working with this variable is similar to the PATH system variable. Lists of modules are combined into one common list: - The modules declared in the configuration file tt.yaml come first - then the modules defined via the environment variable are added. Any duplicates must be removed, while maintaining the original order of module declarations. **Usage example** Set variable: ```sh export TT_CLI_MODULES_PATH=/ext/path/modules:${TT_CLI_MODULES_PATH} ```
db292f8
to
934c56e
Compare
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.
I think we could add an integration test that a module could be found in a path passed with the variable, not just in "modules". Could we?
Yes, integration tests will need to be added. But they won't work at the current stage, as there is nothing to run to test yet. There is a task assigned to the tests #1039. |
Why not? In theory, the directory should add a module path, so we could add a test in which modules (in the current implementation) will be located at the path. Or am I missed something? |
Creating an integration test requires that there should be a difference in external behaviour in the operation of the utility, and this has not yet been implemented. Unit testing, in theory, allows for such verification. But we don't test implementation of private methods, while public methods don't have implementation until #1014 will be done. |
Closes #1013
@TarantoolBot document
Title: Use environment variable to find modules.
The TT_CLI_MODULES_PATH environment variable specifies a list of
module's paths separated by a colon “:”.
It can be set externally from tt and must contain a list of
folders where modules are located.
The logic of working with this variable is similar to the PATH
system variable.
Lists of modules are combined into one common list:
Any duplicates must be removed, while maintaining the original
order of module declarations.
Usage example
Set variable: