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

update geometry.ex to force recompilation on upgrade #174

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

aeruder
Copy link
Contributor

@aeruder aeruder commented Sep 22, 2023

This will fix the upgrade weirdness when switching between branches on 3.4.3 and 3.4.4. Right now since all we did was add the optional dependency, it apparently isn't enough to encourage Elixir 1.15 to recompile this module -- however, if we actually make a (very minor) change on the upgrade, it will recompile every time.

This will fix the upgrade weirdness when switching between branches on 3.4.3 and 3.4.4.  Right now since all we did was add the optional dependency, it apparently isn't enough to encourage Elixir 1.15 to recompile this module -- however, if we actually make a (very minor) change on the upgrade, it will recompile every time.
@aeruder
Copy link
Contributor Author

aeruder commented Sep 22, 2023

This was mentioned in #164 but I apparently missed these emails for the last 4 days. 😞

@aeruder
Copy link
Contributor Author

aeruder commented Sep 22, 2023

Unfortunately too late for 3.4.4 but perhaps worth cutting a 3.4.5 to avoid the weirdness around changing branches?

Copy link
Collaborator

@s3cur3 s3cur3 left a comment

Choose a reason for hiding this comment

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

Oh! Interesting... yeah, the fix makes sense to me, and in my testing, it works reliably when going forward (that is, from 3.4.3 to the PR branch), but I still get an unknown type Geo.PostGIS.Geometry error going back from the PR branch to v3.4.3.

In any case, it seems like it helps with the migration path, so I'm gonna cut a release. 👍

@s3cur3 s3cur3 merged commit 905faeb into felt:master Sep 22, 2023
19 checks passed
@adamu
Copy link

adamu commented Sep 25, 2023

Isn't this an issue with how Postgrex works?

Postgrex.Types.define/3 must be called on its own file, outside of any module and function, as it only needs to be defined once during compilation.

Because of this, every time a dependency used when calling define/3 is updated, if there are no changes to the upstream definition in application code, the necessary changes won't be pulled in, at least for incremental builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants