-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Standardize package names: lower-case, not Mixed_CASE #2475
Conversation
Can you elaborate on point 3: "Works better on macOS"? |
Running things like |
The mac file system, by default, is "case-insensitive but case-preserving", it remembers how you created a file but doesn't use the info for anything. The Google has more info, e.g. here. I learned this back in the day when I was working with a project in svn that had both a |
By the way, I made a few changes to how |
@glennpj @JavierCVilla Pinging the two guys that contributed most to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change from R
to r
is the only thing particularly controversial about this PR, but I'm in favor of it.
I concur. But remember, we use lapack not LAPACK. x not X. And so on for
so many other acronym packages. The only difference is r is only one
letter.
…On Dec 5, 2016 11:13 AM, "Adam J. Stewart" ***@***.***> wrote:
***@***.**** approved this pull request.
I think the change from R to r is the only thing particularly
controversial about this PR, but I'm in favor of it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2475 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cdzI4m2cTbIoXs6Jn5o8O2pY71HOIks5rFDglgaJpZM4LDnC7>
.
|
i never used |
I like the consistency. Mostly looking for @glennpj's feedback as I believe he has R users. |
@tgamblin That change should be fine. |
@tgamblin also fine with me |
@citibeth Ok people are ok with this. Let's get this merged quickly, as it is a lot of changes. Can you rebase on current |
17bc1f6
to
e76e9a3
Compare
OK, done. |
I added a test to enforce the convention, so Travis will fail if new, nonconforming packages appear. While I was doing that, I encountered an issue. The updates in this branch do NOT naturally take effect for Mac OS X users, because git doesn't correct the directory names. This causes tests like How do we make this not immediately break for Mac OS X users? It would be nice if we could easily check the branch out and switch to a new one without getting case errors, but I dunno the best way to do it without calling @davydden: can you check this branch out without getting test errors on your mac due to uncorrected directory names in |
Yes you are right, and I don't know the solution. I discovered that issue
early on when trying to APPLY these fixes on the Mac. To me that's just
one more reason to try to get this merged.
…On Mon, Dec 5, 2016 at 7:06 PM, Todd Gamblin ***@***.***> wrote:
I added a test to enforce the convention, so Travis will fail if new,
nonconforming packages appear.
While I was doing that, I encountered an issue. The updates in this branch
do NOT naturally take effect for Mac OS X users, because git doesn't
correct the directory names. This causes tests like package_sanity to
fail. It's similar to the issue mentioned above where mv works in funny
ways on Mac OS X. This *may* be because I use GNU mv from coreutils and
not the builtin Mac OS X mv but I don't know what git uses to change
names on checkout.
How do we make this not immediately break for Mac OS X users? It would be
nice if we could easily check the branch out and switch to a new one
without getting case errors, but I dunno the best way to do it without
calling git ls-tree and correcting the builtin package repo.
@davydden <https://github.com/davydden>: can you check this branch out
without getting test errors on your mac due to uncorrected directory names
in var/spack/repos/builtin/packages?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2475 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cd9HI8i0YCg313b5XyOswTD7XPiWfks5rFKb5gaJpZM4LDnC7>
.
|
@citibeth I'm not sure about this but just in case, shouldn't affect the change to lower-case also to these parts of the current R/package.py file?
I mean in the |
No, I don't think it changes that. The R build creates a directory in
upper-case called 'R'. That's not something we can (easily) change, nor do
I believe we should try.
…On Tue, Dec 6, 2016 at 9:46 AM, Javier ***@***.***> wrote:
@citibeth <https://github.com/citibeth> I'm not sure about this but just
in case, shouldn't affect the change to lower-case also to these parts of
the current R/package.py file?
@Property
def r_lib_dir(self):
return join_path('rlib', 'R', 'library')
run_env.prepend_path('LIBRARY_PATH',
join_path(self.prefix, 'rlib', 'R', 'lib'))
run_env.prepend_path('LD_LIBRARY_PATH',
join_path(self.prefix, 'rlib', 'R', 'lib'))
run_env.prepend_path('CPATH',
join_path(self.prefix, 'rlib', 'R', 'include'))
# R extension builds can have a global R executable function
module.R = Executable(join_path(self.spec.prefix.bin, 'R'))
I mean in the join_path where R is still appended in upper-case.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2475 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cdw0a_U9gOr5VI_RPofBH9bnrB-PRks5rFXVBgaJpZM4LDnC7>
.
|
There's also a lot of stuff in |
That is a decent idea, but out of the purview of what I originally set out
to do. We can also prevent these things from creeping in by asking for
changes on PRs that have them.
…On Wed, Dec 7, 2016 at 3:06 PM, Adam J. Stewart ***@***.***> wrote:
There's also a lot of stuff in lib/spack/spack/util/naming.py (and
possibly elsewhere) that allows packages to contain _ and A-Z values. If
we really want to be thorough, changing these would completely disallow
future packages from containing these characters.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2475 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cd8OcY4N_vXPQgEqaas42JL5B6MCWks5rFxG8gaJpZM4LDnC7>
.
|
That just adds work for us to keep an eye out for that. At some point, a non-conforming package will slip in, and we will end up in the same mess of not being able to lowercase packages on macOS. Better to do it right the first time if you ask me. |
Can you do it?
…On Wed, Dec 7, 2016 at 3:59 PM, Adam J. Stewart ***@***.***> wrote:
That just adds work for us to keep an eye out for that. At some point, a
non-conforming package will slip in, and we will end up in the same mess of
not being able to lowercase packages on macOS. Better to do it right the
first time if you ask me.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2475 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1cd99R-8njVNYDkKS7VMG-dhoBTu3_ks5rFx4ZgaJpZM4LDnC7>
.
|
Not at the moment (probably not any time soon either). |
4d22010
to
f2bfe6f
Compare
@alalazo @tgamblin Are you able to help with the test failures I'm getting here? It's only failing on Python 2.6.
|
@citibeth I don't know if I'll have time later in the day to check the causes, but it seems it's failing because it checks |
@adamjstewart I found the problem... unit tests were still using underscores in package names instead of dashes. But this yields a few questions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just took another look through this and everything looks solid. There may be other references to capitalized packages in the documentation, but we can fix those whenever. Btw, when I updated the documentation on spack create
in #2707, I updated a couple sections that made it sound like capitalized packages or packages with underscores were fine.
I think at some point, we should update Spack's internals that make sure a package name is valid. These still allow packages with uppercase letters and underscores.
Ping @tgamblin, can we get this merged? It affects a lot of packages and will conflict with #2707 and #2709. I also want to get started on an RPackage
class, which would heavily conflict with this PR since all of the R packages extend R
. Although it would be deleting the extends
directive in these packages.
@@ -367,14 +367,14 @@ and has similar effects on module file of dependees. Even in this case | |||
|
|||
with the following snippet: | |||
|
|||
.. literalinclude:: ../../../var/spack/repos/builtin/packages/R/package.py | |||
.. literalinclude:: ../../../var/spack/repos/builtin/packages/r/package.py | |||
:pyobject: R.setup_environment | |||
|
|||
The ``R`` package also knows which environment variable should be modified |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@citibeth This should be r
. You might want to look through the documentation to make sure there aren't other capitalized packages being reference. The documentation tests aren't foolproof.
OK, I just fixed up that section of the docs. I agree with @adamjstewart,
let's get this merged and deal with docs later. I expect there will be
significant editing/rewriting as we integrate build-system-specific
`Package` superclasses into the docs, I think that's the time to really
edit this stuff carefully.
|
.. literalinclude:: ../../../var/spack/repos/builtin/packages/R/package.py | ||
:pyobject: R.setup_environment | ||
.. literalinclude:: ../../../var/spack/repos/builtin/packages/r/package.py | ||
:pyobject: r.setup_environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't going to work. The class is still named R
, just like python
's class is named Python
. You should remove this particular change.
Fix r->R for class R.
976b364
to
16efdda
Compare
@tgamblin Can we please get this merged? It's been approved and re-approved. I just rebased again... |
@adamjstewart
This PR converts all package names to lower case. Benefits: