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

Incorrectly reports undefined constants #35

Closed
rightbrace opened this issue Feb 9, 2022 · 2 comments
Closed

Incorrectly reports undefined constants #35

rightbrace opened this issue Feb 9, 2022 · 2 comments

Comments

@rightbrace
Copy link

I have an entry file A, which requires B, C, and D. B and C use types from D, but they're always available since A requires them first. This all compiles fine, but crystallline is complaining about undefined constants referenced in B or C from D. What's weird is that it only starts complaining about that when I save B or C, if I save A (even without changes), its fine again. My shard.yml contains:

targets:
  shapes:
    main: src/A

where A is the appropriate filename.

Is this a bug, if not, is there something I can do to force crystalline to do whatever it does when I save A?

@nicklatch
Copy link

nicklatch commented Sep 18, 2024

Sorry to revive an old issue, but did you ever find a solution?

@elbywan
Copy link
Owner

elbywan commented Sep 18, 2024

This should do the trick:

# shard.yml
crystalline:
  main: src/A.cr

In the original example, I think the issue is that the target name shapes does not match the project folder name. Crystalline is unable to infer that this particular target is the actual entry point to use.

@elbywan elbywan closed this as completed Sep 19, 2024
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

3 participants