unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ELPA -- making individual packages
@ 2020-09-03 23:46 Eric Abrahamsen
  2020-09-04  0:18 ` Stefan Kangas
  2020-09-04  1:08 ` Stefan Monnier
  0 siblings, 2 replies; 12+ messages in thread
From: Eric Abrahamsen @ 2020-09-03 23:46 UTC (permalink / raw)
  To: emacs-devel

I just realized to my horror that my Gnorb package in ELPA barfs up
several screenfuls of warnings when it compiles. I'd like to fix those
warnings by compiling it with a clean batch Emacs, using the GNUmakefile
in the git repo, but my only option is to make *all* the packages at
once, and that fails almost immediately on cpio-mode.

Can "make" do catchall targets, where for instance I could say "make
gnorb" and make would check that "gnorb" isn't an existing target, and
the catchall target would say "if the directory "packages/gnorb" exists
then compile that, otherwise bail"?

I'm guessing the answer is no...

Eric




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-03 23:46 ELPA -- making individual packages Eric Abrahamsen
@ 2020-09-04  0:18 ` Stefan Kangas
  2020-09-04  0:36   ` Eric Abrahamsen
  2020-09-04  1:08 ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Kangas @ 2020-09-04  0:18 UTC (permalink / raw)
  To: Eric Abrahamsen, emacs-devel

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I just realized to my horror that my Gnorb package in ELPA barfs up
> several screenfuls of warnings when it compiles. I'd like to fix those
> warnings by compiling it with a clean batch Emacs, using the GNUmakefile
> in the git repo, but my only option is to make *all* the packages at
> once, and that fails almost immediately on cpio-mode.
>
> Can "make" do catchall targets, where for instance I could say "make
> gnorb" and make would check that "gnorb" isn't an existing target, and
> the catchall target would say "if the directory "packages/gnorb" exists
> then compile that, otherwise bail"?
>
> I'm guessing the answer is no...

AFAIK, the answer is indeed no.

This has also been discussed in Bug#38140:

    https://debbugs.gnu.org/38140



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-04  0:18 ` Stefan Kangas
@ 2020-09-04  0:36   ` Eric Abrahamsen
  2020-09-04  1:11     ` Stefan Kangas
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2020-09-04  0:36 UTC (permalink / raw)
  To: emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I just realized to my horror that my Gnorb package in ELPA barfs up
>> several screenfuls of warnings when it compiles. I'd like to fix those
>> warnings by compiling it with a clean batch Emacs, using the GNUmakefile
>> in the git repo, but my only option is to make *all* the packages at
>> once, and that fails almost immediately on cpio-mode.
>>
>> Can "make" do catchall targets, where for instance I could say "make
>> gnorb" and make would check that "gnorb" isn't an existing target, and
>> the catchall target would say "if the directory "packages/gnorb" exists
>> then compile that, otherwise bail"?
>>
>> I'm guessing the answer is no...
>
> AFAIK, the answer is indeed no.
>
> This has also been discussed in Bug#38140:
>
>     https://debbugs.gnu.org/38140

Ah, I missed that, thanks. Well, if it's not something that can be done
cleanly using existing "make" functionality, I don't think it's worth
hacking anything together. It's always possible to put something
together on the command line.

Thanks,
Eric




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-03 23:46 ELPA -- making individual packages Eric Abrahamsen
  2020-09-04  0:18 ` Stefan Kangas
@ 2020-09-04  1:08 ` Stefan Monnier
  2020-09-04  3:25   ` Eric Abrahamsen
  2020-09-04 13:01   ` Benjamin Riefenstahl
  1 sibling, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2020-09-04  1:08 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-devel

> I just realized to my horror that my Gnorb package in ELPA barfs up
> several screenfuls of warnings when it compiles. I'd like to fix those
> warnings by compiling it with a clean batch Emacs, using the GNUmakefile
> in the git repo, but my only option is to make *all* the packages at
> once, and that fails almost immediately on cpio-mode.

[ Hmm... cpio-mode seems to build fine for me (with a crapload of
  warnings, tho).  Can you send me the error log so I can try and
  fix it?  ]

> Can "make" do catchall targets, where for instance I could say "make
> gnorb" and make would check that "gnorb" isn't an existing target, and
> the catchall target would say "if the directory "packages/gnorb" exists
> then compile that, otherwise bail"?

I don't think `make` can do exactly that, but there's no doubt that we
should be able to provide a way to build just a particular package
(maybe the target would have to be called something else than just
`gnorb`, e.g. `compile-gnorb`).  It's probably not that hard.


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-04  0:36   ` Eric Abrahamsen
@ 2020-09-04  1:11     ` Stefan Kangas
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Kangas @ 2020-09-04  1:11 UTC (permalink / raw)
  To: Eric Abrahamsen, emacs-devel

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Ah, I missed that, thanks. Well, if it's not something that can be done
> cleanly using existing "make" functionality, I don't think it's worth
> hacking anything together. It's always possible to put something
> together on the command line.

Oh, sorry, I misread your question.  I'm not sure if it's doable with
"make", I guess it should be?  I just meant to say that "we don't have
support for that right now AFAIK, and here's the bug report to show for
it".



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-04  1:08 ` Stefan Monnier
@ 2020-09-04  3:25   ` Eric Abrahamsen
  2020-09-08 13:12     ` Stefan Monnier
  2020-09-04 13:01   ` Benjamin Riefenstahl
  1 sibling, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2020-09-04  3:25 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> I just realized to my horror that my Gnorb package in ELPA barfs up
>> several screenfuls of warnings when it compiles. I'd like to fix those
>> warnings by compiling it with a clean batch Emacs, using the GNUmakefile
>> in the git repo, but my only option is to make *all* the packages at
>> once, and that fails almost immediately on cpio-mode.
>
> [ Hmm... cpio-mode seems to build fine for me (with a crapload of
>   warnings, tho).  Can you send me the error log so I can try and
>   fix it?  ]

Dunno what's going on here, I tried once (first make externals, then
make) and it gave me:

  INFO     Scraping files for counsel-autoloads.el...done
  INFO     Scraping files for cpio-mode-autoloads.el...
cpio-newc-test.el:0:0: error: scan-error: (Unbalanced parentheses 2556 2702)
make: *** [GNUmakefile:141: packages/cpio-mode/cpio-mode-autoloads.el] Error 255

I just pulled again, and did the same thing over, and now it gave me:

Generating description file packages/sml-mode/sml-mode-pkg.el
Generating description file packages/sql-beeline/sql-beeline-pkg.el
Search failed: ";;; sql-beeline.el ends here"
make: *** [GNUmakefile:194: packages/sql-beeline/sql-beeline-pkg.el] Error 255

I assume I'm just doing something wrong in the build process.

>> Can "make" do catchall targets, where for instance I could say "make
>> gnorb" and make would check that "gnorb" isn't an existing target, and
>> the catchall target would say "if the directory "packages/gnorb" exists
>> then compile that, otherwise bail"?
>
> I don't think `make` can do exactly that, but there's no doubt that we
> should be able to provide a way to build just a particular package
> (maybe the target would have to be called something else than just
> `gnorb`, e.g. `compile-gnorb`).  It's probably not that hard.

I'd be happy to help, but "make" is one of those things I wish I had
learned years ago so I already knew it, and didn't have to learn it.
But with some pointers I might be able to figure it out.

Eric




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-04  1:08 ` Stefan Monnier
  2020-09-04  3:25   ` Eric Abrahamsen
@ 2020-09-04 13:01   ` Benjamin Riefenstahl
  2020-09-04 17:41     ` Eric Abrahamsen
  1 sibling, 1 reply; 12+ messages in thread
From: Benjamin Riefenstahl @ 2020-09-04 13:01 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eric Abrahamsen, emacs-devel

Hi all,

Stefan Monnier writes:
> I don't think `make` can do exactly that, but there's no doubt that we
> should be able to provide a way to build just a particular package
> (maybe the target would have to be called something else than just
> `gnorb`, e.g. `compile-gnorb`).  It's probably not that hard.

Right, in GNU make I have done it like this before:

  compile-%:
      echo Making package $* ...
      [commands to make the package]

  test-%:
      echo Testing package $* ...
      [commands to test the package]

benny



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-04 13:01   ` Benjamin Riefenstahl
@ 2020-09-04 17:41     ` Eric Abrahamsen
  2020-09-04 22:20       ` Eric Abrahamsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2020-09-04 17:41 UTC (permalink / raw)
  To: Benjamin Riefenstahl; +Cc: Stefan Monnier, emacs-devel

Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:

> Hi all,
>
> Stefan Monnier writes:
>> I don't think `make` can do exactly that, but there's no doubt that we
>> should be able to provide a way to build just a particular package
>> (maybe the target would have to be called something else than just
>> `gnorb`, e.g. `compile-gnorb`).  It's probably not that hard.
>
> Right, in GNU make I have done it like this before:
>
>   compile-%:
>       echo Making package $* ...
>       [commands to make the package]
>
>   test-%:
>       echo Testing package $* ...
>       [commands to test the package]

Well, this is as far as I've been able to get:

.PHONY:
compile-%:
	@if [ -d "$(CURDIR)/packages/$*" ]; then		      \
	  $(MAKE) -C "$(CURDIR)/packages/$*" "*.elc";                 \
	else							      \
	  echo "No such package: $*";                         	      \
	fi;

I'm not able to give any target to the sub-invocation of make that it
will recognize as a valid target.

I figured this rule shouldn't build autoloads or the *-pkg.el file, so
it would be pretty simple, but I'm basically shooting in the dark here.

Eric



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-04 17:41     ` Eric Abrahamsen
@ 2020-09-04 22:20       ` Eric Abrahamsen
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Abrahamsen @ 2020-09-04 22:20 UTC (permalink / raw)
  To: Benjamin Riefenstahl; +Cc: Stefan Monnier, emacs-devel

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:
>
>> Hi all,
>>
>> Stefan Monnier writes:
>>> I don't think `make` can do exactly that, but there's no doubt that we
>>> should be able to provide a way to build just a particular package
>>> (maybe the target would have to be called something else than just
>>> `gnorb`, e.g. `compile-gnorb`).  It's probably not that hard.
>>
>> Right, in GNU make I have done it like this before:
>>
>>   compile-%:
>>       echo Making package $* ...
>>       [commands to make the package]
>>
>>   test-%:
>>       echo Testing package $* ...
>>       [commands to test the package]
>
> Well, this is as far as I've been able to get:
>
> .PHONY:
> compile-%:
> 	@if [ -d "$(CURDIR)/packages/$*" ]; then		      \
> 	  $(MAKE) -C "$(CURDIR)/packages/$*" "*.elc";                 \
> 	else							      \
> 	  echo "No such package: $*";                         	      \
> 	fi;

Off-list someone sent me this:

define RULE-pkg
$(notdir $(1)): $(filter $(1)/%, $(elcs))
endef

$(foreach pkg, $(pkgs), $(eval $(call RULE-pkg, $(pkg))))

Which seems to work! Called with the bare package name. One weird thing,
though, is that for each file being compiled I get:

Unable to activate package ‘relint’.
Required package ‘xr-1.19’ is unavailable
Unable to activate package ‘exwm’.
Required package ‘xelb-0.18’ is unavailable
Unable to activate package ‘ebdb-i18n-chn’.
Required package ‘pyim-1.6.0’ is unavailable
Unable to activate package ‘counsel’.
Required package ‘swiper-0.13.1’ is unavailable

Which is odd since the package I'm compiling doesn't have anything to do
with those packages.

But, closer to success.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-04  3:25   ` Eric Abrahamsen
@ 2020-09-08 13:12     ` Stefan Monnier
  2020-09-08 16:19       ` Eric Abrahamsen
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2020-09-08 13:12 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-devel

>>> I just realized to my horror that my Gnorb package in ELPA barfs up
>>> several screenfuls of warnings when it compiles. I'd like to fix those
>>> warnings by compiling it with a clean batch Emacs, using the GNUmakefile
>>> in the git repo, but my only option is to make *all* the packages at
>>> once, and that fails almost immediately on cpio-mode.
>>
>> [ Hmm... cpio-mode seems to build fine for me (with a crapload of
>>   warnings, tho).  Can you send me the error log so I can try and
>>   fix it?  ]
>
> Dunno what's going on here, I tried once (first make externals, then
> make) and it gave me:
>
>   INFO     Scraping files for counsel-autoloads.el...done
>   INFO     Scraping files for cpio-mode-autoloads.el...
> cpio-newc-test.el:0:0: error: scan-error: (Unbalanced parentheses 2556 2702)
> make: *** [GNUmakefile:141: packages/cpio-mode/cpio-mode-autoloads.el] Error 255

Hmm... I don't see any `cpio-newc-test.el` here.  Any chance this got
fixed by pulling again?

> Generating description file packages/sml-mode/sml-mode-pkg.el
> Generating description file packages/sql-beeline/sql-beeline-pkg.el
> Search failed: ";;; sql-beeline.el ends here"
> make: *** [GNUmakefile:194: packages/sql-beeline/sql-beeline-pkg.el] Error 255

Should be fixed now,


        Stefan




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-08 13:12     ` Stefan Monnier
@ 2020-09-08 16:19       ` Eric Abrahamsen
  2020-09-08 17:07         ` Eric Abrahamsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Abrahamsen @ 2020-09-08 16:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>>> I just realized to my horror that my Gnorb package in ELPA barfs up
>>>> several screenfuls of warnings when it compiles. I'd like to fix those
>>>> warnings by compiling it with a clean batch Emacs, using the GNUmakefile
>>>> in the git repo, but my only option is to make *all* the packages at
>>>> once, and that fails almost immediately on cpio-mode.
>>>
>>> [ Hmm... cpio-mode seems to build fine for me (with a crapload of
>>>   warnings, tho).  Can you send me the error log so I can try and
>>>   fix it?  ]
>>
>> Dunno what's going on here, I tried once (first make externals, then
>> make) and it gave me:
>>
>>   INFO     Scraping files for counsel-autoloads.el...done
>>   INFO     Scraping files for cpio-mode-autoloads.el...
>> cpio-newc-test.el:0:0: error: scan-error: (Unbalanced parentheses 2556 2702)
>> make: *** [GNUmakefile:141: packages/cpio-mode/cpio-mode-autoloads.el] Error 255
>
> Hmm... I don't see any `cpio-newc-test.el` here.  Any chance this got
> fixed by pulling again?

Yes it did -- I think I *thought* I had pulled before I made the first
time, but hadn't, so I was building something very stale. This and the
sql-beeline error are gone now. Building gives a lot of warnings
(expected, I guess), and weird lines like:

Byte compiling packages/chess/chess-eco.el
Unable to activate package ‘ebdb-i18n-chn’.
Required package ‘pyim-1.6.0’ is unavailable

For each file compiled. Those warnings look suspiciously relevant to me,
and I tried sticking a "-Q" in the EMACS command at the top of
GNUmakefile, but still got them.

What do you think about the per-package compile command? I feel like
that last rule definition got pretty close -- in fact, the warnings I
was getting from it look just like the warnings above, so maybe the rule
itself is fine...

Eric



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ELPA -- making individual packages
  2020-09-08 16:19       ` Eric Abrahamsen
@ 2020-09-08 17:07         ` Eric Abrahamsen
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Abrahamsen @ 2020-09-08 17:07 UTC (permalink / raw)
  To: emacs-devel

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>>>> I just realized to my horror that my Gnorb package in ELPA barfs up
>>>>> several screenfuls of warnings when it compiles. I'd like to fix those
>>>>> warnings by compiling it with a clean batch Emacs, using the GNUmakefile
>>>>> in the git repo, but my only option is to make *all* the packages at
>>>>> once, and that fails almost immediately on cpio-mode.
>>>>
>>>> [ Hmm... cpio-mode seems to build fine for me (with a crapload of
>>>>   warnings, tho).  Can you send me the error log so I can try and
>>>>   fix it?  ]
>>>
>>> Dunno what's going on here, I tried once (first make externals, then
>>> make) and it gave me:
>>>
>>>   INFO     Scraping files for counsel-autoloads.el...done
>>>   INFO     Scraping files for cpio-mode-autoloads.el...
>>> cpio-newc-test.el:0:0: error: scan-error: (Unbalanced parentheses 2556 2702)
>>> make: *** [GNUmakefile:141: packages/cpio-mode/cpio-mode-autoloads.el] Error 255
>>
>> Hmm... I don't see any `cpio-newc-test.el` here.  Any chance this got
>> fixed by pulling again?
>
> Yes it did -- I think I *thought* I had pulled before I made the first
> time, but hadn't, so I was building something very stale. This and the
> sql-beeline error are gone now.

Actually the process didn't make it all the way through, and blew up on:

Byte compiling packages/phps-mode/phps-mode-wy.el
Unable to activate package ‘ebdb-i18n-chn’.
Required package ‘pyim-1.6.0’ is unavailable
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’
*** redefining precedence of ‘%precedence’

In toplevel form:
packages/phps-mode/phps-mode-wy.el:270:17: Error: Symbol ‘exit_expr’ is used, but is not defined as a token and has no rules
make: *** [GNUmakefile:173: packages/phps-mode/phps-mode-wy.elc] Error 1

Let me know if there's a more useful or systematic way I can report
these errors or help fix them.




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-09-08 17:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-03 23:46 ELPA -- making individual packages Eric Abrahamsen
2020-09-04  0:18 ` Stefan Kangas
2020-09-04  0:36   ` Eric Abrahamsen
2020-09-04  1:11     ` Stefan Kangas
2020-09-04  1:08 ` Stefan Monnier
2020-09-04  3:25   ` Eric Abrahamsen
2020-09-08 13:12     ` Stefan Monnier
2020-09-08 16:19       ` Eric Abrahamsen
2020-09-08 17:07         ` Eric Abrahamsen
2020-09-04 13:01   ` Benjamin Riefenstahl
2020-09-04 17:41     ` Eric Abrahamsen
2020-09-04 22:20       ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).