Skip to content

Conversation

@wpferguson
Copy link
Member

While working on a solution to #386, I ran into a circular dependency problem when I tried to use the filename/path/extension functions in the file library in the string library.

The file library includes the string library, so when I tried to include the file library in the string library it created a circular dependency which led to a stack overflow.

Since these functions are really string functions the string library is really the proper home for them.

I left the original functions in place, rewritten to just call the string functions, to maintain compatibility with all of the existing scripts.

… string library. Left

                      the existing function calls in place for backward compatibility.  They
                      now call the new functions in the string library

lib/dtutils.string - Moved the filename/path/extension string functions to the string library
                     to prevent a circular library depnedency.  The file library includes the
                     string library.  If the string library needed to manipulate filename
                     related strings then the string library would need to include the
                     file library which would lead to a stack overflow.
@wpferguson wpferguson merged commit c0af03c into darktable-org:master Mar 25, 2023
@wpferguson wpferguson deleted the move_filename_string_functions_to_strings_library branch March 25, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant