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 not find classes in Lucky project #67

Open
notramo opened this issue Jun 20, 2023 · 3 comments
Open

Can not find classes in Lucky project #67

notramo opened this issue Jun 20, 2023 · 3 comments
Labels
question Further information is requested

Comments

@notramo
Copy link

notramo commented Jun 20, 2023

crystalline doesn't work in Lucky projects, becuse it can't find required classes in migrations. The reason can be that the db/ directory is in the project root, not in the src/ folder.

Also, it doesn't work with macro-generated Lucky classes, like MyModel::DeleteOperation.

@elbywan
Copy link
Owner

elbywan commented Jun 21, 2023

crystalline doesn't work in Lucky projects, becuse it can't find required classes in migrations. The reason can be that the db/ directory is in the project root, not in the src/ folder.

The entry point part of the readme should hopefully cover this - creating a custom .crystalline_main.cr file which requires both folders.

Also, it doesn't work with macro-generated Lucky classes, like MyModel::DeleteOperation.

This is also expected, the only support for macros yet is showing the expansion on hover.

@elbywan elbywan added the question Further information is requested label Jun 21, 2023
@notramo
Copy link
Author

notramo commented Jun 21, 2023

This is also expected, the only support for macros yet is showing the expansion on hover.

But if a class inherits from a macro-generated class, then LSP support stops working inside the class e.g. goto definition, or autocompletion doesn't work, even if the goto target class is not macro-generated.

@notramo
Copy link
Author

notramo commented Jun 21, 2023

It works to some extent after adding .crystalline_main.cr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants