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

Relative path fixes needed #9

Open
brandonferens opened this issue Oct 2, 2024 · 0 comments
Open

Relative path fixes needed #9

brandonferens opened this issue Oct 2, 2024 · 0 comments

Comments

@brandonferens
Copy link
Member

The imports method in the abstract enum generator is prone to bugs. The method attempts to figure out where the custom methods exist and where the abstract enum exists and the relative path between the two so that the imported custom methods are handled correctly.

Given the following two paths:

  • resources/js/enums
  • resources/js/vendor/paragon/enums

It will determine the relative path is ../vendor/paragon/enums which is what we want.

The issue is this. After it determines the closest parent directory, in the above case js/ it starts determining if it should use .. as the path, or a directory name. If a directory name happens to be the same further down in the child directories it will get replaced with ... For example:

  • resources/js/enums/paragon
  • resources/js/vendor/paragon/enums

This would result in the path ../vendor/../enums as the fourth directory in each are the same.

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

No branches or pull requests

1 participant