Skip to content
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

Can't tag functions if project name contains functions #140

Open
MysteryBlokHed opened this issue Sep 17, 2021 · 1 comment · Fixed by #141
Open

Can't tag functions if project name contains functions #140

MysteryBlokHed opened this issue Sep 17, 2021 · 1 comment · Fixed by #141
Labels
bug Something isn't working lib Related to the Databind library source Affects the project's source

Comments

@MysteryBlokHed
Copy link
Owner

MysteryBlokHed commented Sep 17, 2021

This following code from files::get_namespace uses the following code to get a path that ends with the namespace folder:

let namespace_folder = functions_path
.as_ref()
.to_str()
.unwrap()
.split("functions")
.next()
.unwrap();

Because of the .split("functions"), the first instance of functions in the path is split. This is a problem if any part of the path contains the word functions.

@MysteryBlokHed MysteryBlokHed added bug Something isn't working source Affects the project's source lib Related to the Databind library labels Sep 17, 2021
@MysteryBlokHed MysteryBlokHed added this to the Databind 0.7.2 milestone Sep 17, 2021
MysteryBlokHed added a commit that referenced this issue Sep 17, 2021
CLoses #140

Fixes a problem where `files::get_namespace` wouldn't work properly if
the path contained the word `functions` at any point. This is actually
not backwards-compatible due to the change of return type from
`Result<&str, &str>` to `Result<String, &str>`, but the API isn't stable
and isn't used by anyone else so it seems ok to release as a patch.
@MysteryBlokHed
Copy link
Owner Author

#141 did not fix this issue and was reverted in 4a762fd.

@MysteryBlokHed MysteryBlokHed changed the title Can't tag functions if project name contains folder Can't tag functions if project name contains functions Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib Related to the Databind library source Affects the project's source
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant