Hello everyone,
I’m running into some serious issues keeping my library compatible with the latest version of Crystal (1.13). Specifically, I’m talking about Clear, which no longer compiles.
After spending a couple of hours trying to diagnose the problem, it looks like there have been changes to scope resolution that are causing numerous issues.
For example:
class Clear::Migration::Table < Clear::Migration::Operation
include Clear::Migration::FullTextSearchableTableHelpers
end
This no longer compiles, throwing an error that Clear::Migration::FullTextSearchableTableHelpers
doesn’t exist.
However, these variations do work:
class Clear::Migration::Table < Clear::Migration::Operation
include ::Clear::Migration::FullTextSearchableTableHelpers
end
class Clear::Migration::Table < Clear::Migration::Operation
include FullTextSearchableTableHelpers
end
This is just one of many issues cropping up, and I’ve been unable to get everything running. I’m also encountering strange symbols like Clear::Migration::Clear::Migration
, which suggests that objects are being referenced within nested modules incorrectly. This is confusing, especially since all my require
statements are within the program’s scope.
I haven’t opened an issue on GitHub yet because I haven’t been able to distill the bug into a simple, reproducible form. I would really appreciate it if someone could clone the project, try running the specs, and help me troubleshoot these problems.
In the meantime, does anyone know the best way to revert to an older version of Crystal? The Snap install doesn’t offer channels for older versions. The last time I did any maintenance was in April 2023, and I used the latest Crystal build available at that time. Unfortunately, the shard.yml
doesn’t specify an exact version, so I’m unsure which version was used.
I’m under a bit of pressure to do some maintenance builds for a client and am stuck until I can resolve this. Any help would be greatly appreciated!