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

Crashing on specific function, working on others #621

Closed
esetnik opened this issue Sep 14, 2023 · 6 comments · Fixed by #624
Closed

Crashing on specific function, working on others #621

esetnik opened this issue Sep 14, 2023 · 6 comments · Fixed by #624
Labels
bug Something isn't working

Comments

@esetnik
Copy link

esetnik commented Sep 14, 2023

Describe the bug

Line: " public function getDepartmentTrainingPlans(string $departmentId)"

Exception: Vim(return):E474: Expected true: thread 'main' panicked at 'called Option::unwrap() on a None value', src/php/parser.rs:172:34
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Helper output: thread 'main' panicked at 'called Option::unwrap() on a None value', src/php/parser.rs:172:34
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Error detected while processing function doge#generate[31]..doge#run_parser[56]..function doge#generate[31]..doge#run_parser:
line 51:
[vim-doge] php parser failed
Press ENTER or type command to continue

Settings

To Reproduce

Steps to reproduce the behavior:

  1. ...

Expected behavior

Screenshots

Output of ./bin/vim-doge-helper --version

Output of vim --version

@esetnik esetnik added the bug Something isn't working label Sep 14, 2023
@kkoomen
Copy link
Owner

kkoomen commented Sep 17, 2023

Hi,

Please provide me the whole class code you have so that I can have an example.

@esetnik
Copy link
Author

esetnik commented Sep 18, 2023

Can I send privately? It's closed source.

@kkoomen
Copy link
Owner

kkoomen commented Sep 19, 2023

@esetnik Sure. Mail me at [email protected]

@kkoomen
Copy link
Owner

kkoomen commented Sep 19, 2023

@esetnik Found the problem, even after working for so many years in PHP, I for somehow only took into account use statement usages of use Foo\Bar; but not use Foo; which resulted in an error. See #624, after tests pass, I'll do a new release. Expect a new release within an hour from now on. I'll mention it here when the release is published.

Thanks a lot for sharing the code in order for me to resolve this issue, highly appreciated!

@kkoomen
Copy link
Owner

kkoomen commented Sep 19, 2023

Hi,

I just release v4.3.4, but through your code, I ran into another bug, so I had to do another release. Please use the new v4.3.5 and let me know if everything works as expected. I've tested lots of functions in the code you sent me, and they all generate proper documentation with v4.3.5! :) So, I don't expect anything odd to come up.

@esetnik
Copy link
Author

esetnik commented Sep 20, 2023

I can confirm v4.3.5 is working well in that file now 👍.

Thanks for all your hard work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants