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

keg: mkpath while linking {include,lib,share}/postgresql@X #16966

Merged
merged 1 commit into from Mar 29, 2024

Conversation

cho-m
Copy link
Member

@cho-m cho-m commented Mar 28, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

I think this will make it easier to retain extensions on different PostgreSQL.

citus, for example, installs files like:

  • include/postgresql@14/server/citus_version.h
  • lib/postgresql@14/citus.so
  • share/postgresql@14/extension/citus--10.0-1--10.0-2.sql

Reasoning here is we may need to manually link some keg_only files/dirs inside the post install of postgresql@X formulae; however, if another formula already created symlink paths then it will make things complicated.

I guess some other alternatives would be:

  1. expose the keg.link_dir logic that does all the symlink-to-real-directory conversion. However, Keg is @api private and we may not want to change this.
    def link_dir(relative_dir, verbose: false, dry_run: false, overwrite: false)
  2. extend keg_only DSL to allow "partial" keg_only. Con here is this will require various code modifications (across link code, DSL, JSON API, etc) for something that may only be useful for PostgreSQL.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Great idea and this makes sense to me, thanks @cho-m!

@MikeMcQuaid MikeMcQuaid merged commit 4501e38 into Homebrew:master Mar 29, 2024
25 checks passed
@cho-m cho-m deleted the keg-postgresql-mkpath branch March 29, 2024 11:38
cho-m added a commit to cho-m/brew that referenced this pull request Apr 11, 2024
Fix logic in Homebrew#16966 as it only matched subdirectories

Signed-off-by: Michael Cho <[email protected]>
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants