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

ENV: move to new paths. #507

Merged
merged 1 commit into from
Jul 15, 2016
Merged

ENV: move to new paths. #507

merged 1 commit into from
Jul 15, 2016

Conversation

MikeMcQuaid
Copy link
Member

  • 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 tests with your changes locally?

Move some stuff formerly in Library/ENV around:

  • Move Library/ENV/$XCODE_VERSION to Library/Homebrew/env/super as they are
    all superenv wrappers and all symlinks to the same version. We never needed
    the "separate shims for separate versions" functionality and it just adds
    confusion.
  • Move Library/ENV/pkgconfig to Library/Homebrew/env/pkgconfig to get more
    things under Library/Homebrew
  • Move Library/ENV/scm to Library/scm as these wrappers are not actually
    used by or related to superenv (or stdenv) in any way.

@BrewTestBot BrewTestBot added the in progress Maintainers are working on this label Jul 13, 2016
@MikeMcQuaid MikeMcQuaid mentioned this pull request Jul 13, 2016
5 tasks
@xu-cheng
Copy link
Member

xu-cheng commented Jul 13, 2016

I briefly checked all scripts, it seems that all of them should work fine although some of them make some assumption on file location. Double checked, the git/svn script in the superenv will fail to locate brewed git/svn even after fixing the symlink.

But git and svn symlink in superenv will have to be updated accordingly.

@MikeMcQuaid
Copy link
Member Author

@xu-cheng Thanks, fixed.

@xu-cheng
Copy link
Member

You fixed super/git script but broke scm/git in the process.

To check it, you can add echo $brew_version; exit 0; in the script. You will see now scm/git won't find brew git.

May I suggest to put scm folder inside Homebrew/env because they are in fact env related, except for the fact that they are used all the time by homebrew, while superenv and stdenv are only build related.

@MikeMcQuaid
Copy link
Member Author

May I suggest to put scm folder inside Homebrew/env because they are in fact env related, except for the fact that they are used all the time by homebrew, while superenv and stdenv are only build related.

I think we could have a wrappers folder or something but I think env is confusing as it doesn't relate to ENV, superenv or stdenv.

@MikeMcQuaid
Copy link
Member Author

You fixed super/git script but broke scm/git in the process.

To check it, you can add echo $brew_version; exit 0; in the script. You will see now scm/git won't find brew git.

Thanks, fixed. I see they assumed they were at the same level before so I've fixed that.

@MikeMcQuaid
Copy link
Member Author

@BrewTestBot test this please

@MikeMcQuaid
Copy link
Member Author

Will wait and see what @UniqMartin thinks about this (but no rush there, Martin).

@@ -12,7 +12,9 @@

# Paths pointing into the Homebrew code base that persist across test runs
HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../..", __FILE__))
HOMEBREW_ENV_PATH = HOMEBREW_LIBRARY_PATH.parent+"ENV"
HOMEBREW_ENV_PATH = \
HOMEBREW_LIBRARY_PATH.parent+"Homebrew/env"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this line need to be wrapped, but the line directly underneath doesn't (though it has the exact same line length when unwrapped)? I think if we wanted to conserve some vertical space here, we'd be better off just dropping the unnecessary whitespace between the constant and the assignment operator.

Copy link
Member Author

Choose a reason for hiding this comment

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

Bad edits. Will fix 👍

@UniqMartin
Copy link
Contributor

👍 on the general cleanup and relocation of Library/ENV to Library/Homebrew. Any reason you renamed ENV to env in the process? ENV in Library/Homebrew/extend is still capitalized and I guess both have some (historical) relationship.

I think we could have a wrappers folder or something but I think env is confusing as it doesn't relate to ENV, superenv or stdenv.

👍 on having wrappers. Or maybe even better support? This sounds like it could be a generic enough name to host the SCM wrappers, the superenv wrappers, as well as the pkgconfig files in their respective subdirectories.

(I haven't thoroughly checked the necessary code changes. I'd prefer to wait with checking whether any of the wrapper scripts are broken after we have agreed on a directory layout.)

Will wait and see what @UniqMartin thinks about this (but no rush there, Martin).

Thanks, this is much appreciated—also in the other related PR! ❤️

@MikeMcQuaid
Copy link
Member Author

👍 on the general cleanup and relocation of Library/ENV to Library/Homebrew. Any reason you renamed ENV to env in the process? ENV in Library/Homebrew/extend is still capitalized and I guess both have some (historical) relationship.

I think mainly because I don't think they actually relate to ENV as-in the Ruby class but instead the Superenv and Stdenv classes and hopefully longer-term we can stop monkeypatching ENV 😉

👍 on having wrappers. Or maybe even better support? This sounds like it could be a generic enough name to host the SCM wrappers, the superenv wrappers, as well as the pkgconfig files in their respective subdirectories.

I'm 👍 on wrappers and 👎 on support. Other names: {install-,}{shims,scripts,support,wrappers,helpers} (most of these I'd prefer with an install or similar prefix)?

(I haven't thoroughly checked the necessary code changes. I'd prefer to wait with checking whether any of the wrapper scripts are broken after we have agreed on a directory layout.)

Agreed.

@MikeMcQuaid
Copy link
Member Author

I'm 👍 on wrappers and 👎 on support. Other names: {install-,}{shims,scripts,support,wrappers,helpers} (most of these I'd prefer with an install or similar prefix)?

Although I guess technically the install applies to pkgconfig and superenv but not to the scm scripts/wrappers/stubs/helpers.

@UniqMartin
Copy link
Contributor

I'm not convinced the install- prefix would add any value. (It actually confuses me a bit.) Of those you mentioned, I think shims and wrappers are the better choices, thus I'd go with shims/scm and shims/superenv for all those shims/wrappers.

The pkgconfig files are really specific to macOS, so I guess os/mac/pkgconfig would be a sensible place to move them to.

Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
  all superenv wrappers and all symlinks to the same version. We never needed
  the "separate shims for separate versions" functionality and it just adds
  confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
  things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
  used by or related to superenv (or stdenv) in any way.
@MikeMcQuaid
Copy link
Member Author

@UniqMartin Done!

@MikeMcQuaid MikeMcQuaid merged commit a02be9e into Homebrew:master Jul 15, 2016
@BrewTestBot BrewTestBot removed the in progress Maintainers are working on this label Jul 15, 2016
@MikeMcQuaid MikeMcQuaid deleted the move-superenv-shims branch July 15, 2016 18:09
@andyli
Copy link

andyli commented Jul 15, 2016

Look like it causes error when migrating old version of Homebrew to v0.9.9:

/usr/local/Library/Homebrew/cmd/update.sh: line 6: /usr/local/Library/ENV/scm/git: No such file or directory

@MikeMcQuaid
Copy link
Member Author

Thanks @andyli, will fix.

@bilibiliwwhh
Copy link

brew install php55-redis:
/usr/local/opt/php55/bin/phpize: line 61: /usr/local/Library/ENV/4.3/sed: No such file or directory
I have checked ,/usr/local/Library/ENV/ has been removed.

@MikeMcQuaid
Copy link
Member Author

@bilibiliwwhh Please report that to Homebrew PHP.

souvik1997 pushed a commit to souvik1997/brew that referenced this pull request Jul 25, 2016
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
  all superenv wrappers and all symlinks to the same version. We never needed
  the "separate shims for separate versions" functionality and it just adds
  confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
  things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
  used by or related to superenv (or stdenv) in any way.
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants