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

Rename inotifyTools to inotify-tools #9456

Closed
Havvy opened this issue Aug 26, 2015 · 16 comments
Closed

Rename inotifyTools to inotify-tools #9456

Havvy opened this issue Aug 26, 2015 · 16 comments

Comments

@Havvy
Copy link
Contributor

Havvy commented Aug 26, 2015

The pakage inotifyTools should be called inotify-tools, no?

@edolstra
Copy link
Member

Yes.

@vcunat
Copy link
Member

vcunat commented Aug 26, 2015

A mass rename of camelCase attributes to dashed-style?

We don't have a nixpkgs equivalent of nixos/modules/rename.nix, do we?

@edolstra
Copy link
Member

At the bottom of all-packages.nix there is a section for aliases:

  # Attributes for backward compatibility.
  adobeReader = adobe-reader;
  ...

@vcunat
Copy link
Member

vcunat commented Aug 26, 2015

Yes, but it would be nice if using deprecated aliases would print a warning during evaluation.

@copumpkin
Copy link
Member

{
  adobeReader = builtins.trace "get yo act together" adobe-reader;
}

@vcunat
Copy link
Member

vcunat commented Aug 26, 2015

Hmm, perhaps, we can save some typing by:

{
   # usual package definitions
  foo = bar;
} // lib.mapAttrs (name: builtins.trace "Warning: using a deprecated attribute '${name}'") {
  # Attributes for backward compatibility.
  adobeReader = adobe-reader;
  # ...
}

I tested this, and it looks good IMHO. Any reason not to have this change, even in 15.09?

@copumpkin
Copy link
Member

I like it!

@Havvy
Copy link
Contributor Author

Havvy commented Aug 28, 2015

The warning should be more specific.

Warning: using a deprecated attribute '${name}'. Camel-case attributes have been switched out with dashes. For example, instead of using 'inotifyTools', use 'inotify-tools'

Note: If there's a more popular (and open) package, use that for the example than just inotifyTools.

@vcunat
Copy link
Member

vcunat commented Aug 31, 2015

@Havvy: the deprecation of a name might be for different reasons, such us upstream renaming (cool-old-term -> cool-retro-term). We would have to split away this specific naming-unification group, which does make most of all deprecations ATM.

vcunat added a commit that referenced this issue Aug 31, 2015
The aliases are split into two groups, as mass-renaming is anticipated.
Also added fold markers as in the rest of file.
#9456
vcunat added a commit that referenced this issue Aug 31, 2015
The aliases are split into two groups, as mass-renaming is anticipated.
Also added fold markers as in the rest of file.
#9456

(cherry picked from commit c53018c)
@vcunat
Copy link
Member

vcunat commented Aug 31, 2015

Pushed adding the warnings. I'm not sure if the mass-replace should be in 15.09. It would perhaps be better to have more consistent naming between master and 15.09, as we could have some cherry-picking problems later.

@Mayeu
Copy link
Contributor

Mayeu commented Sep 1, 2015

Hello, I'm commenting here since I just saw those warning messages in my shell.

trace: Warning: using a deprecated attribute 'clangAnalyzer'. CamelCase and under_scores are replaced by dashed-names to match the nix-env names better.
trace: Warning: using a deprecated attribute 'cool-old-term'

From a user perspective, I have no clue what to do to deal with those messages/packages:

  • Should I reinstall the package manually?
  • Will nix take care of everything by itself now or in the future?
  • If I should manually change the package, how do I find the new package name? (for example in the case of 'cool-old-term', there is no info on why it is deprecated, and what is its new name)
  • And if I have to reinstall should I remove the old one?

I think there should be some kind of direction in this message, either pointing to an how-to URL, or even giving command to copy/paste to fix the issue.

And by the way, I actually have no clue of what would be the clean way to switch to the new package name ^^

@vcunat
Copy link
Member

vcunat commented Sep 1, 2015

@Mayeu: if you are using the identifier cool-old-term (for example), how did you find out about it in the first place? Surely not by guessing. Most of the deprecated names are just aliases – if you use the new names, nothing changes except that the warning will disappear.

The message could explain all that, and it could also print the new attribute path, with some refactoring, but there is a more serious problem: ATM it throws this trace for all deprecated attributes when doing nix-env -qa, see comments on 8e8e23d.

edolstra added a commit that referenced this issue Sep 1, 2015
This reverts commit c53018c. This
causes problems for "nix-env -qa", so we'll have to come up with a
clean solution first.

Issue #9456.
@vcunat
Copy link
Member

vcunat commented Sep 1, 2015

@Mayeu: anyway, the warnings are reverted for now.

@Mayeu
Copy link
Contributor

Mayeu commented Sep 1, 2015

@vcunat Thank for your response. Some packages are the one that I explicitly installed, and as you said, I did not guess them out of luck. But other are just dependencies that I have no idea were installed. Thus questions ensue.

I really think NixOS is a great OS and is the right way of doing package management, and as a recent user I also see all the roughness it has right now. That's why I wanted to jump in to give some input from the «common user» point of view :)

@vcunat
Copy link
Member

vcunat commented Sep 1, 2015

Feedback is welcome.

edolstra added a commit that referenced this issue Sep 2, 2015
This reverts commit c53018c. This
causes problems for "nix-env -qa", so we'll have to come up with a
clean solution first.

Issue #9456.

(cherry picked from commit 3ea329c)
edolstra added a commit that referenced this issue Sep 2, 2015
Fixes #9456.

(cherry picked from commit 9013dc5)
@vcunat
Copy link
Member

vcunat commented Sep 2, 2015

For followup discussion see commit 8e8e23d.

adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
The aliases are split into two groups, as mass-renaming is anticipated.
Also added fold markers as in the rest of file.
NixOS#9456

(cherry picked from commit c53018c)
adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
This reverts commit c53018c. This
causes problems for "nix-env -qa", so we'll have to come up with a
clean solution first.

Issue NixOS#9456.

(cherry picked from commit 3ea329c)
adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
Fixes NixOS#9456.

(cherry picked from commit 9013dc5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants