Coder Social home page Coder Social logo

Packaging about emacs-sql-indent HOT 9 CLOSED

alex-hhh avatar alex-hhh commented on September 28, 2024 1
Packaging

from emacs-sql-indent.

Comments (9)

purcell avatar purcell commented on September 28, 2024 2

both the GNU ELPA and the MELPA sql-indent packages are listed by list-packages and the package that I select is the one that gets installed and used. What difficulties did you encounter?

That's easier for manual installation than with programmatic use of use-package and package-install, though it's possible for the latter with package-pinned-packages. Most users won't think to use that to select a different "sql-indent" package. By default, then, most package.el-using Emacs developers will not see your package by default, which is a pity.

It is unfortunate that there are several packages named "sql-indent", but the current name is simple, short enough, and indicates exactly what the package is doing. I don't want to change it to "sqlind". The name "sql-indent" is too long to be used as a function prefix, and "sqlind" seems to me to be about right. The elisp coding conventions do not require the prefix to match the feature name, this is a MELPA rule only.

Yes, true, but I'd argue that the coding conventions are somewhat outdated in this regard: with many thousands of packages now, this is really the most sane way to ensure that different packages don't start using the same abbreviated prefixes internally, and therefore clash unexpectedly. In increasingly enforcing the rule for MELPA, we're trying to prioritise community sanity over individual author preferences, which is certainly an opinionated approach.

There cannot be two indentation packages installed side by side for the same programming mode, as they would override each other, regardless of what the packages are named.

Not entirely true. It's absolutely correct that you can't have two different indentation methods enabled simultaneously. But note that the Emacs standard library includes many packages - some of which conflict - which are all available for use, but are not enabled by default. And the package.el ecosystem is meant to be an extension of that standard library.

So it would absolutely reasonable for a user to have multiple similar packages installed, and then switch between them. The only thing that prevents this is when the similar packages have identical names: then the user must physically uninstall one package to use the other!

Is this package really working on 24.3? (apart from the missing header) I only test this package on recent Emacs versions, and it might use elisp features that are not be present in Emacs 24.3. Do you know someone who can confirm that this package is working in 24.3?

From a quick look, with cl-lib installed, it appears it might even work in 24.1.

(@kensanata) Can’t you just drop mine? I haven’t used it in years.

But others are presumably using it satisfactorily, including the maintainer who adopted it in 2015, so I'm not keen to pronounce it dead. I guess it just seems like that should be unnecessary.

I'm really happy to see more and more useful packages in ELPA, and I'm always pleased when authors move their packages from MELPA to ELPA. It would be great if the package namespace were global to the community, rather than incompatibly overlapping between the two repositories.

Not sure if there's anything to be done here, but having made my case, obviously I'll leave it up to @alex-hhh. 😄

from emacs-sql-indent.

kensanata avatar kensanata commented on September 28, 2024 2

This sounds good to me. I haven't used my own sql-indent in years if not decades. Whoever wrote something called sql-indent surely superseded whatever I did. Don't keep the zombies alive.

from emacs-sql-indent.

tarsius avatar tarsius commented on September 28, 2024 2

This sounds good to me. I haven't used my own sql-indent in years if not decades. Whoever wrote something called sql-indent surely superseded whatever I did. Don't keep the zombies alive.

I have removed Alex's implementation. It very much looks like a minimal-viable implementation, which is better than nothing, but now that there is a more featureful implementation that should be used instead.

from emacs-sql-indent.

kensanata avatar kensanata commented on September 28, 2024

from emacs-sql-indent.

alex-hhh avatar alex-hhh commented on September 28, 2024

No MELPA user will easily be able to use your package, as it stands.

I have packages installed from both MELPA and GNU ELPA and was able to install sql-indent from GNU ELPA without any problems: both the GNU ELPA and the MELPA sql-indent packages are listed by list-packages and the package that I select is the one that gets installed and used. What difficulties did you encounter?

I'd suggest renaming this to sqlind, so that everything matches up.

It is unfortunate that there are several packages named "sql-indent", but the current name is simple, short enough, and indicates exactly what the package is doing. I don't want to change it to "sqlind". The name "sql-indent" is too long to be used as a function prefix, and "sqlind" seems to me to be about right. The elisp coding conventions do not require the prefix to match the feature name, this is a MELPA rule only.

Renaming the package might cause even more confusion. There cannot be two indentation packages installed side by side for the same programming mode, as they would override each other, regardless of what the packages are named.

P.S. You're missing a ;; Package-Requires: ((cl-lib "0.6')) header, which users of Emacsen < 24.3 would need.

Is this package really working on 24.3? (apart from the missing header) I only test this package on recent Emacs versions, and it might use elisp features that are not be present in Emacs 24.3. Do you know someone who can confirm that this package is working in 24.3?

from emacs-sql-indent.

PierreTechoueyres avatar PierreTechoueyres commented on September 28, 2024

Hello @alex-hhh,

It's a bit off-topic but would you mind to update (or I could do it) the version tag in sqlind.el to trigger an update in GNU Elpa ?
If I understand correctly what Stefan Monnier wrote, this should be enough to trigger the packaging.

From: Stefan Monnier <[email protected]>
Subject: Re: RFC: Adding BBDB to Emacs core
Newsgroups: gmane.emacs.devel
To: [email protected]
Date: Tue, 17 Apr 2018 09:07:46 -0400 (2 days, 4 hours, 20 minutes ago)

> - Take BBDB as an example: It is not too difficult to break a user's
> database by trying to improve some of BBDB's internal functions.  That's
> why right now I prefer to continue to use BBDB's repository on savannah
> for code development.  When a code change appears to be sufficiently
> stable, it is also added to BBDB in ELPA.

FWIW, currently GNU ELPA supports this in the following way: a new GNU
ELPA package is only created once the "Version:" of a package is bumped.
So you can add experimental code to elpa.git's master branch without
worrying about its effect on the distributed package and when that code
is ready you can just bump the "Version:" header to cause a new release.


        Stefan

from emacs-sql-indent.

alex-hhh avatar alex-hhh commented on September 28, 2024

Hi @PierreTechoueyres,

Triggering a package rebuild by changing version numbers will only work if the code is pushed to the ELPA.git repository. I don't have permission to push there, but I can ask the ELPA maintainers to do that.

However, the reason I delayed it is that I wanted to fix a packaging problem, but did not get around to do that, see #63 . I will not have time to look into that issue in the next 2 weeks or so, so if you want to give it a try, please do so.

PS. You misspelled sql-indent.el :-)

from emacs-sql-indent.

monnier avatar monnier commented on September 28, 2024

[ Coming late to this discussion, I have no intention to impose any particular choice, but can't resist giving my opinion. ]

  • I agree with Steve on the "package-name vs prefix" issue: we should move towards unifying the two. It will have benefits in avoiding name clashes, and it also makes it easier to automatically find a function or variable's definition when its package is not yet loaded.
  • Also agreed in the need to allow installation of different packages even when they "conflict" in terms of the functionality they provide. After all, you might even use them both at the same time (probably in different buffers). E.g. perl-mode and cperl-mode which can be used at the same time (in different buffers). Note that cperl-mode and perl-mode used to conflict, so this ability to use them both didn't happen by accident: I had to go and rename some things to make it happen.
  • This said, I don't know if Alex's sql-indent should be considered as a different package from Alex's sql-indent or rather as a "new version". package.el allows having different versions of the same package installed at the same time (but only one of them can be activated in a given Emacs session).
  • IIUC the immediate problem between the old MELPA package and the new GNU ELPA package [to me "ELPA" refers to the generic protocol/infrastructure, not to the particular GNU ELPA archive] is one of versioning because MELPA uses versions like "20170405" which will also compare as newer than versions like "1.3". This is an old problem which also affects different versions of the same package (i.e. when a package that was in MELPA gets moved to GNU ELPA), so this problem is not specific to sql-indent.

from emacs-sql-indent.

tarsius avatar tarsius commented on September 28, 2024

Still, it would have been better to deal with the conflict early on.

from emacs-sql-indent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.