-
Notifications
You must be signed in to change notification settings - Fork 380
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
Hide symbols back #5932
Comments
See discussion #5733 |
LeonidVas
added a commit
that referenced
this issue
Jul 29, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac Part of #5932
LeonidVas
added a commit
that referenced
this issue
Jul 29, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac Part of #5932
LeonidVas
added a commit
that referenced
this issue
Jul 29, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac Part of #5932
LeonidVas
added a commit
that referenced
this issue
Jul 29, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac Part of #5932
LeonidVas
added a commit
that referenced
this issue
Jul 29, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac Part of #5932
LeonidVas
added a commit
that referenced
this issue
Jul 30, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 2, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) Explanation of adding some controversial symbols to the export list: * The following symbols are used in shared libraries used in tests ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so", "gh-5938-wrong-string-length.so", "module_api.so") mp_check mp_encode_array mp_encode_bin mp_encode_bool mp_encode_int mp_encode_map mp_encode_nil mp_encode_str mp_encode_uint mp_decode_array_slowpath mp_decode_str mp_next_slowpath mp_load_u8 mp_next mp_sizeof_array mp_sizeof_str mp_type_hint decimal_from_string * These symbols are used in "crypto.lua" and, if absent, will lead to the failure of the "static_build_cmake_linux" on CI (the crypto prefix was used to avoid the clashes of names) crypto_ERR_error_string crypto_ERR_get_error crypto_EVP_DigestInit_ex crypto_EVP_DigestUpdate crypto_EVP_DigestFinal_ex crypto_EVP_get_digestbyname crypto_HMAC_Init_ex crypto_HMAC_Update crypto_HMAC_Final * For correct work of "schema.lua" in the "static_build_cmake_linux" rl_get_screen_size * The following symbols are used in "ssl-cert-paths-discover.test.lua" (I think these symbols will have to be wrapped in the to avoid clashes problems) X509_get_default_cert_dir_env X509_get_default_cert_file_env ssl_cert_paths_discover From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and "tt_uuid_str" (see [7]). The "check_merge_source.c" test has been changed, now working with "fiber" and "diag" is done through API (changes were caused by hiding "diag_get"). To get a fiber Lua state, the "fiber_lua_state_internal" function has been added to the internal API. 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac 6. #4225 7. acf8745 Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 2, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) Explanation of adding some controversial symbols to the export list: * The following symbols are used in shared libraries used in tests ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so", "gh-5938-wrong-string-length.so", "module_api.so") mp_check mp_encode_array mp_encode_bin mp_encode_bool mp_encode_int mp_encode_map mp_encode_nil mp_encode_str mp_encode_uint mp_decode_array_slowpath mp_decode_str mp_next_slowpath mp_load_u8 mp_next mp_sizeof_array mp_sizeof_str mp_type_hint decimal_from_string * These symbols are used in "crypto.lua" and, if absent, will lead to the failure of the "static_build_cmake_linux" on CI (the crypto prefix was used to avoid the clashes of names) crypto_ERR_error_string crypto_ERR_get_error crypto_EVP_DigestInit_ex crypto_EVP_DigestUpdate crypto_EVP_DigestFinal_ex crypto_EVP_get_digestbyname crypto_HMAC_Init_ex crypto_HMAC_Update crypto_HMAC_Final * For correct work of "schema.lua" in the "static_build_cmake_linux" rl_get_screen_size * The following symbols are used in "ssl-cert-paths-discover.test.lua" (I think these symbols will have to be wrapped in the to avoid clashes problems) X509_get_default_cert_dir_env X509_get_default_cert_file_env ssl_cert_paths_discover From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and "tt_uuid_str" (see [7]). The "check_merge_source.c" test has been changed, now working with "fiber" and "diag" is done through API (changes were caused by hiding "diag_get"). To get a fiber Lua state, the "fiber_lua_state_internal" function has been added to the internal API. 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac 6. #4225 7. acf8745 Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 2, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) Explanation of adding some controversial symbols to the export list: * The following symbols are used in shared libraries used in tests ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so", "gh-5938-wrong-string-length.so", "module_api.so") mp_check mp_encode_array mp_encode_bin mp_encode_bool mp_encode_int mp_encode_map mp_encode_nil mp_encode_str mp_encode_uint mp_decode_array_slowpath mp_decode_str mp_next_slowpath mp_load_u8 mp_next mp_sizeof_array mp_sizeof_str mp_type_hint decimal_from_string * These symbols are used in "crypto.lua" and, if absent, will lead to the failure of the "static_build_cmake_linux" on CI (the crypto prefix was used to avoid the clashes of names) crypto_ERR_error_string crypto_ERR_get_error crypto_EVP_DigestInit_ex crypto_EVP_DigestUpdate crypto_EVP_DigestFinal_ex crypto_EVP_get_digestbyname crypto_HMAC_Init_ex crypto_HMAC_Update crypto_HMAC_Final * For correct work of "schema.lua" in the "static_build_cmake_linux" rl_get_screen_size * The following symbols are used in "ssl-cert-paths-discover.test.lua" (I think these symbols will have to be wrapped in the to avoid clashes problems) X509_get_default_cert_dir_env X509_get_default_cert_file_env ssl_cert_paths_discover From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and "tt_uuid_str" (see [7]). The "check_merge_source.c" test has been changed, now working with "fiber" and "diag" is done through API (changes were caused by hiding "diag_get"). To get a fiber Lua state, the "fiber_lua_state_internal" function has been added to the internal API. 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac 6. #4225 7. acf8745 Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 3, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) Explanation of adding some controversial symbols to the export list: * The following symbols are used in shared libraries used in tests ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so", "gh-5938-wrong-string-length.so", "module_api.so") mp_check mp_encode_array mp_encode_bin mp_encode_bool mp_encode_int mp_encode_map mp_encode_nil mp_encode_str mp_encode_uint mp_decode_array_slowpath mp_decode_str mp_next_slowpath mp_load_u8 mp_next mp_sizeof_array mp_sizeof_str mp_type_hint decimal_from_string * These symbols are used in "crypto.lua" and, if absent, will lead to the failure of the "static_build_cmake_linux" on CI (the crypto prefix was used to avoid the clashes of names) crypto_ERR_error_string crypto_ERR_get_error crypto_EVP_DigestInit_ex crypto_EVP_DigestUpdate crypto_EVP_DigestFinal_ex crypto_EVP_get_digestbyname crypto_HMAC_Init_ex crypto_HMAC_Update crypto_HMAC_Final * For correct work of "schema.lua" in the "static_build_cmake_linux" rl_get_screen_size * The following symbols are used in "ssl-cert-paths-discover.test.lua" (I think these symbols will have to be wrapped in the to avoid clashes problems) X509_get_default_cert_dir_env X509_get_default_cert_file_env ssl_cert_paths_discover From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and "tt_uuid_str" (see [7]). The "check_merge_source.c" test has been changed, now working with "fiber" and "diag" is done through API (changes were caused by hiding "diag_get"). To get a fiber Lua state, the "fiber_lua_state_internal" function has been added to the internal API. 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac 6. #4225 7. acf8745 Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 3, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) Explanation of adding some controversial symbols to the export list: * The following symbols are used in shared libraries used in tests ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so", "gh-5938-wrong-string-length.so", "module_api.so") mp_check mp_encode_array mp_encode_bin mp_encode_bool mp_encode_int mp_encode_map mp_encode_nil mp_encode_str mp_encode_uint mp_decode_array_slowpath mp_decode_str mp_next_slowpath mp_load_u8 mp_next mp_sizeof_array mp_sizeof_str mp_type_hint decimal_from_string * These symbols are used in "crypto.lua" and, if absent, will lead to the failure of the "static_build_cmake_linux" on CI (the crypto prefix was used to avoid the clashes of names) crypto_ERR_error_string crypto_ERR_get_error crypto_EVP_DigestInit_ex crypto_EVP_DigestUpdate crypto_EVP_DigestFinal_ex crypto_EVP_get_digestbyname crypto_HMAC_Init_ex crypto_HMAC_Update crypto_HMAC_Final * For correct work of "schema.lua" in the "static_build_cmake_linux" rl_get_screen_size * The following symbols are used in "ssl-cert-paths-discover.test.lua" (I think these symbols will have to be wrapped in the to avoid clashes problems) X509_get_default_cert_dir_env X509_get_default_cert_file_env ssl_cert_paths_discover From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and "tt_uuid_str" (see [7]). The "check_merge_source.c" test has been changed, now working with "fiber" and "diag" is done through API (changes were caused by hiding "diag_get"). To get a fiber Lua state, the "fiber_lua_state_internal" function has been added to the internal API. 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac 6. #4225 7. acf8745 Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 3, 2021
Wrap the exported readline function to avoid clash of symbols. Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 3, 2021
Wrap the symbols used in the "ssl-cert-paths-discover" test to avoid clashes. Symbols from openssl have been wraped to: crypto_X509_get_default_cert_dir_env crypto_X509_get_default_cert_file_env Tarantool symbols have been prefixed by "tnt_": tnt_ssl_cert_paths_discover tnt_default_cert_dir_paths tnt_default_cert_file_paths Part of #5932
LeonidVas
added a commit
that referenced
this issue
Aug 13, 2021
Exporting symbols of a third party library is not a best practice, as we know from [1]. Let's wrap the msgpack symbols that need to be exported with the "tnt_" prefix. While working on the patch, it was decided to export the msgpack symbols that are used in "msgpuckffi.lua". In test shared libraries where the symbols "mp_***_{decimal,uuid}" are used, they are replaced to exported "tnt_mp_***_{decimal,uuid}", because in the case of linking with "libcore.a" the "libcore.a" needs to be rebuild with the "-fPIC" flag, that seems as overkill for tests. 1. tarantool/memcached#59 Closes #5932
LeonidVas
added a commit
that referenced
this issue
Sep 21, 2021
Exporting symbols of a third party library is not a best practice, as we know from [1]. Let's wrap the msgpack symbols that need to be exported with the "tnt_" prefix. While working on the patch, it was decided to export the msgpack symbols that are used in "msgpuckffi.lua". In test shared libraries where the symbols "mp_***_{decimal,uuid}" are used, they are replaced to exported "tnt_mp_***_{decimal,uuid}", because in the case of linking with "libcore.a" the "libcore.a" needs to be rebuild with the "-fPIC" flag, that seems as overkill for tests. 1. tarantool/memcached#59 Closes #5932
kyukhin
pushed a commit
that referenced
this issue
Sep 27, 2021
Exporting symbols of a third party library is not a best practice, as we know from [1]. Let's wrap the msgpack symbols that need to be exported with the "tnt_" prefix. While working on the patch, it was decided to export the msgpack symbols that are used in "msgpuckffi.lua". In test shared libraries where the symbols "mp_***_{decimal,uuid}" are used, they are replaced to exported "tnt_mp_***_{decimal,uuid}", because in the case of linking with "libcore.a" the "libcore.a" needs to be rebuild with the "-fPIC" flag, that seems as overkill for tests. 1. tarantool/memcached#59 Closes #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) Explanation of adding some controversial symbols to the export list: * The following symbols are used in shared libraries used in tests ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so", "gh-5938-wrong-string-length.so", "module_api.so") mp_check mp_encode_array mp_encode_bin mp_encode_bool mp_encode_int mp_encode_map mp_encode_nil mp_encode_str mp_encode_uint mp_decode_array_slowpath mp_decode_str mp_next_slowpath mp_load_u8 mp_next mp_sizeof_array mp_sizeof_str mp_type_hint decimal_from_string * These symbols are used in "crypto.lua" and, if absent, will lead to the failure of the "static_build_cmake_linux" on CI (the crypto prefix was used to avoid the clashes of names) crypto_ERR_error_string crypto_ERR_get_error crypto_EVP_DigestInit_ex crypto_EVP_DigestUpdate crypto_EVP_DigestFinal_ex crypto_EVP_get_digestbyname crypto_HMAC_Init_ex crypto_HMAC_Update crypto_HMAC_Final * For correct work of "schema.lua" in the "static_build_cmake_linux" rl_get_screen_size * The following symbols are used in "ssl-cert-paths-discover.test.lua" (I think these symbols will have to be wrapped in the to avoid clashes problems) X509_get_default_cert_dir_env X509_get_default_cert_file_env ssl_cert_paths_discover From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and "tt_uuid_str" (see [7]). 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac 6. #4225 7. acf8745 Part of #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
Wrap the exported readline function to avoid clash of symbols. Part of #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
Wrap the symbols used in the "ssl-cert-paths-discover" test to avoid clashes. Symbols from openssl have been wraped to: crypto_X509_get_default_cert_dir_env crypto_X509_get_default_cert_file_env Tarantool symbols have been prefixed by "tnt_": tnt_ssl_cert_paths_discover tnt_default_cert_dir_paths tnt_default_cert_file_paths Part of #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
After changing the way symbols are exported, handling several cases in the "ssl-cert-paths-discover" test is no longer necessary. Let's remove it. Part of #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
After unhiding all internal symbols([1]) we experience a bunch of problems ([2], [3]). The second one (clash of symbols from different version of the "small" library) still have no good solution. You can find more on the topic [4]. The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library. Let's hide all symbols by default and create a list of exported symbols. (In fact, this patch is a revert of the patch 03790ac ([5]) taking into account the changes made to the code) Explanation of adding some controversial symbols to the export list: * The following symbols are used in shared libraries used in tests ("cfunc*.so", "sql_uuid.so", "gh-6024-funcs-return-bin.so", "function1.so", "gh-5938-wrong-string-length.so", "module_api.so") mp_check mp_encode_array mp_encode_bin mp_encode_bool mp_encode_int mp_encode_map mp_encode_nil mp_encode_str mp_encode_uint mp_decode_array_slowpath mp_decode_str mp_next_slowpath mp_load_u8 mp_next mp_sizeof_array mp_sizeof_str mp_type_hint decimal_from_string * These symbols are used in "crypto.lua" and, if absent, will lead to the failure of the "static_build_cmake_linux" on CI (the crypto prefix was used to avoid the clashes of names) crypto_ERR_error_string crypto_ERR_get_error crypto_EVP_DigestInit_ex crypto_EVP_DigestUpdate crypto_EVP_DigestFinal_ex crypto_EVP_get_digestbyname crypto_HMAC_Init_ex crypto_HMAC_Update crypto_HMAC_Final * For correct work of "schema.lua" in the "static_build_cmake_linux" rl_get_screen_size * The following symbols are used in "ssl-cert-paths-discover.test.lua" (I think these symbols will have to be wrapped in the to avoid clashes problems) X509_get_default_cert_dir_env X509_get_default_cert_file_env ssl_cert_paths_discover From "exports.test.lua" have been removed ZSTD symbols checking (see [6]) and "tt_uuid_str" (see [7]). 1. #2971 2. #5001 3. tarantool/memcached#59 4. https://lists.tarantool.org/pipermail/tarantool-discussions/2020-September/000095.html 5. 03790ac 6. #4225 7. acf8745 Part of #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
Wrap the exported readline function to avoid clash of symbols. Part of #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
Wrap the symbols used in the "ssl-cert-paths-discover" test to avoid clashes. Symbols from openssl have been wraped to: crypto_X509_get_default_cert_dir_env crypto_X509_get_default_cert_file_env Tarantool symbols have been prefixed by "tnt_": tnt_ssl_cert_paths_discover tnt_default_cert_dir_paths tnt_default_cert_file_paths Part of #5932
yanshtunder
pushed a commit
that referenced
this issue
Oct 4, 2021
After changing the way symbols are exported, handling several cases in the "ssl-cert-paths-discover" test is no longer necessary. Let's remove it. Part of #5932
Totktonada
added a commit
to Totktonada/tarantool
that referenced
this issue
Jul 16, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see tarantool#2971 and tarantool#5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of tarantool#7228 Related to tarantool#6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API
Totktonada
added a commit
to Totktonada/tarantool
that referenced
this issue
Jul 16, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see tarantool#2971 and tarantool#5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of tarantool#7228 Related to tarantool#6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API
Totktonada
added a commit
to Totktonada/tarantool
that referenced
this issue
Jul 16, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see tarantool#2971 and tarantool#5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of tarantool#7228 Related to tarantool#6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API
Totktonada
added a commit
to Totktonada/tarantool
that referenced
this issue
Jul 18, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see tarantool#2971 and tarantool#5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of tarantool#7228 Related to tarantool#6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API
Totktonada
added a commit
to Totktonada/tarantool
that referenced
this issue
Jul 18, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see tarantool#2971 and tarantool#5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of tarantool#7228 Related to tarantool#6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API
locker
pushed a commit
that referenced
this issue
Aug 1, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see #2971 and #5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of #7228 Related to #6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API
locker
pushed a commit
that referenced
this issue
Aug 1, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see #2971 and #5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of #7228 Related to #6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API (cherry picked from commit 395c30e)
p7nov
pushed a commit
that referenced
this issue
Aug 3, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see #2971 and #5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of #7228 Related to #6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API (cherry picked from commit 395c30e)
mkokryashkin
pushed a commit
to mkokryashkin/tarantool
that referenced
this issue
Sep 9, 2022
The Rust module [1] leans on several internal symbols. They were open in Tarantool 2.8 (see tarantool#2971 and tarantool#5932), but never were in the public API. Tarantool 2.10.0 hides the symbols and we need a way to get them back to use in the module. We have the following options: 1. Design and expose a module API for fiber channels. 2. Export the symbols with a prefix like `tnt_internal_` (to don't spoil the global namespace). 3. Provide a `dlsym()` alike function to get an address of an internal symbol for users who knows what they're doing. I think that the third way offers the best compromise between amount of effort, quality of the result and opportunities to extend. In this commit I hardcoded the list of functions to make the change as safe as possible. Later I'll return here to autogenerate the list. Exported the following function from the tarantool executable: ```c void * tnt_internal_symbol(const char *name); ``` I don't add it into the module API headers, because the function is to perform a dark magic and we don't suggest it for users. While I'm here, added `static` to a couple of fiber channel functions, which are only used within the compilation unit. [1]: https://github.com/picodata/tarantool-module Part of tarantool#7228 Related to tarantool#6372 NO_DOC=don't advertize the dangerous API NO_CHANGELOG=don't advertize the dangerous API
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After #2971 we experience a bunch of problems (1, 2). The second one still have no good solution. You can find more on the topic here.
Another side of the problem is that I heard from time to time: hey, someone can check that a symbol is present and use it in a module despite that there is no statement that we'll keep it. Yet another side of the problem is that C API description on the website significantly behind the actual state (at least I see no actions around new APIs), but it is out of scope here.
My proposal:
The only advantage of the unhiding symbols: sometimes you can hack something for certain tarantool executable using LuaJIT's FFI, but you'll anyway unable to use this hack in a module, because the symbol may disappear in any build: even from the same tarantool version range, but with other OS or toolchain.
The situation for tarantool executable is the same as for any other library. A library should expose only its public API and should not increase probability of hard to debug problems due to clash of a user's code with an internal name from the library.
The text was updated successfully, but these errors were encountered: