Skip to content

Conversation

@devind-ra
Copy link
Collaborator

@devind-ra devind-ra commented Dec 2, 2025

Description

Refactoring usage in tests and files where all three data structures were used.

Fix for issue #110

Type of change

  • Refactor of tests and codebase

How Has This Been Tested?

Manual testing and unit tests

Configuration:

  • Neovim version (nvim --version): 0.11.5
  • Operating system and version: MacOS 26.1

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation

@devind-ra
Copy link
Collaborator Author

Hey @jkeresman01, I think I've been able to do it. Let me know if you find any issues or tweaks that I need to make. Thanks!

Copy link
Owner

@jkeresman01 jkeresman01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @devind-ra

Sorry for slow response on this.

When I tried testing your changes I've got this 2 errors.

  1. When selecting unique dep for the first time.
E5108: Error executing lua: ...alizr.nvim/lua/spring-initializr/telescope/telescope.lua:165: attempt to get length of field 'selected_dependencies' (a nil value)                                                                                                                
stack traceback:                                                                                                                                                                                                                                                                  
        ...alizr.nvim/lua/spring-initializr/telescope/telescope.lua:165: in function 'record_selection'                                                                                                                                                                           
        ...alizr.nvim/lua/spring-initializr/telescope/telescope.lua:205: in function 'on_select'                                                                                                                                                                                  
        ...alizr.nvim/lua/spring-initializr/telescope/telescope.lua:252: in function 'run_replace_or_original'                                                                                                                                                                    
        ...packer/start/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_func'                                                                                                                                                                                    
        ...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:253: in function <...k/packer/start/telescope.nvim/lua/telescope/mappings.lua:252>    
  1. When trying to remove selected dependency.
E5108: Error executing lua: ...alizr.nvim/lua/spring-initializr/telescope/telescope.lua:182: attempt to call method 'remove_key' (a nil value)                                                                                                                                   
stack traceback:                                                                                                                                                                                                                                                                  
        ...alizr.nvim/lua/spring-initializr/telescope/telescope.lua:182: in function 'remove_dependency'                                                                                                                                                                          
        ...lizr/ui/components/dependencies/dependencies_display.lua:346: in function 'remove_focused_card'                                                                                                                                                                        
        ...lizr/ui/components/dependencies/dependencies_display.lua:380: in function <...lizr/ui/components/dependencies/dependencies_display.lua:379>                                                                                                                            
Press ENTER or type command to continue              

Didn't quite catch enough time to pinpoint exact root cause.
Could you also look it up, see if same issue is present from your side.

@devind-ra
Copy link
Collaborator Author

@jkeresman01, no worries. I'll look into the issue on my side as well and see what's going on. Thanks for the review

@devind-ra
Copy link
Collaborator Author

@jkeresman01, apologies for the delay it was a simpler fix than I thought. Let me know how it works on your side!

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.

2 participants