unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / Atom feed
* bug#50483: [R] Package r-shiny: Shiny server logic inactive
@ 2021-09-09 12:35 Todor Kondić via Bug reports for GNU Guix
  2021-09-15 16:50 ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Todor Kondić via Bug reports for GNU Guix @ 2021-09-09 12:35 UTC (permalink / raw)
  To: 50483

Hi,

I started having issues with R Shiny applications with newer Guix distro commits. I have a feeling that this is an issue arising from `r-shiny` dependency clashes and that (some) of those dependencies should be either downgraded, or upgraded.

The problem is that the server logic of a shiny application is never active. The web application UI is displayed correctly, even initialised correctly, but the logic behind it does not work.

Take, for example, a classic shiny demo app [1]. The control with the number of observations is displayed, but the plot depending on it never shows up. This behavior exists on recent Guix builds [2].

However, on one older build from a few months ago [3], the application runs fine.

You will find below the manifest[4] for creating the environment where Shiny programs malfunction and the command[5] to create the environment with the manifest.

By the way, for those of you who are R savvy, comparing sessionInfo() between the running and non-running version did uncover few version changes. I have not yet delved deeper in
what is the root cause, but I think I noticed that this is not
the difference in versions of R itself.

Lastly, if this is really a universal (ie I am not the
only one seeing this), then this is a significant problem
for a lot of people doing scientific computing on Guix.

sessionInfo() for working version:

R version 4.1.0 (2021-05-18)
Platform: x86_64-unknown-linux-gnu (64-bit)

Matrix products: default
BLAS/LAPACK: /gnu/store/bs9pl1f805ins80xaf4s3n35a0x2lyq3-openblas-0.3.9/lib/libopenblasp-r0.3.9.so

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] shiny_1.6.0

loaded via a namespace (and not attached):
 [1] compiler_4.1.0    fastmap_1.1.0     ellipsis_0.3.2    magrittr_2.0.1
 [5] R6_2.5.0          promises_1.2.0.1  later_1.2.0       tools_4.1.0
 [9] htmltools_0.5.1.1 Rcpp_1.0.6        digest_0.6.27     xtable_1.8-4
[13] httpuv_1.6.1      lifecycle_1.0.0   mime_0.10         rlang_0.4.11

sessionInfo for the non-working version:
R version 4.1.1 (2021-08-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

Matrix products: default
BLAS/LAPACK: /gnu/store/bs9pl1f805ins80xaf4s3n35a0x2lyq3-openblas-0.3.9/lib/libopenblasp-r0.3.9.so

locale:
 [1] LC_CTYPE=en_GB.utf8       LC_NUMERIC=C
 [3] LC_TIME=en_GB.utf8        LC_COLLATE=en_GB.utf8
 [5] LC_MONETARY=en_GB.utf8    LC_MESSAGES=en_GB.utf8
 [7] LC_PAPER=en_GB.utf8       LC_NAME=C
 [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] shiny_1.6.0

loaded via a namespace (and not attached):
 [1] compiler_4.1.1    fastmap_1.1.0     ellipsis_0.3.2    magrittr_2.0.1
 [5] R6_2.5.1          promises_1.2.0.1  later_1.3.0       htmltools_0.5.1.1
 [9] tools_4.1.1       Rcpp_1.0.7        digest_0.6.27     xtable_1.8-4
[13] httpuv_1.6.2      lifecycle_1.0.0   mime_0.11         rlang_0.4.11

Reproducible-ish demo:

1. runme.R
```r
library(ggplot2)
library(shiny)


app <- shinyApp(
    ui = bootstrapPage(
        numericInput('n', 'Number of obs', 100),
        plotOutput('plot')
    ),
    server = function(input, output) {
        output$plot <- renderPlot({ hist(runif(input$n)) })
    }
)


# Will show a warning, because the browser is not in the manifest, but
# it it will serve the application on a listed port, which means it
# can be accessed by a browser external to the environment.
options(browser="itdoesnotmatter")
shiny::runApp(app)

```

2. for example, guix version: 816d52ba93d262548f5e1139ff6051887f13dd0d

3. for example, guix version:
29745d23b87529275a677ee7962b0405594e84db

4. Manifest for creating the environment:

```scheme
(use-modules (guix packages)
	     (guix inferior)
	     (guix channels)
	     (guix profiles)
	     (guix utils)
	     (guix build-system gnu)
	     (gnu packages)
	     (gnu packages commencement)
	     (gnu packages gcc)
             (srfi srfi-1)
	     (ice-9 pretty-print))

(define base-specs '("git"
		     "rsync"
                     "make"))

(define font-specs '("unicode-emoji"
		     "fontconfig"
		     "font-dejavu"
		     "font-gnu-freefont"
		     "font-terminus"
		     "font-liberation"
		     "font-inconsolata"
		     "font-gnu-unifont"
		     "font-public-sans"
		     "font-misc-misc"
		     "font-awesome"
		     "font-hack"
		     "font-iosevka"
		     "font-iosevka-term"
		     "font-iosevka-term-slab"
		     "font-iosevka-slab"
		     "font-iosevka-etoile"
		     "font-iosevka-aile"
		     "font-google-noto"))


(define r-specs '("r"
		  "r-curl"
		  "r-ellipsis"
		  "r-future"
		  "r-rmarkdown"
		  "r-knitr"
		  "r-rcolorbrewer"
		  "r-data-table"
		  "r-shiny"
		  "r-cowplot"
		  "r-pander"
		  "r-rstatix"
                  "r-r-utils"))

(define texlive-specs '("texlive"))

(define misc-specs '("sshpass"
		     "xdg-utils"
		     "xdg-user-dirs"
		     "pango"
		     "libxft"
		     "cairo"
		     "gnupg"
                     "openssl"))





(define java-specs '(;"maven"
		     "openjdk:out"
		     "openjdk:jdk"))

(define perl-specs '("perl-yaml-libyaml"))
(define gnu-toolchain-specs '("gcc-toolchain"))




(define specs `(,@base-specs
		,@font-specs
		,@perl-specs
		,@r-specs
		,@java-specs
		,@gnu-toolchain-specs
		,@misc-specs
                ,@texlive-specs))


(define dev-channels

  (list (channel
	 ;; This is custom Environmental Cheminformatics LCSB channel.
        (name 'eci-addons)
        (url "https://git.sr.ht/~condor/eci-guix")
	(branch "master")
        (introduction
	 (make-channel-introduction
	  "6642600059913e86657242ba369d752c0af2bff5"
	  (openpgp-fingerprint
	   "EDC3 9790 A06D 5F72 41D9  70F9 BBEF E71B 7A28 3C6F"))))
       (channel
         (name 'guix)
         (url "https://git.savannah.gnu.org/git/guix.git")
         (commit "29745d23b87529275a677ee7962b0405594e84db"))))

(define inferior (inferior-for-channels dev-channels))

(define inferior-mnf-entry-list
  (map (lambda (spec)
	 (let*
	     ((spkgout (string-split spec #\:))
	      (spkg (car spkgout))
	      (rest (cdr spkgout))
	      (sout (if (null? rest)
			"out"
			(car rest)))
	      (pkg (first
		    (lookup-inferior-packages inferior spkg))))
	   (display (format #f "Commiting ~a to the inferior manifest list.\n" spkg))
	   (inferior-package->manifest-entry pkg sout)))
       specs))

(display "Done building inferior list.\n")

(define default-manifest
  (make-manifest '()))

(define all-manifest-entries inferior-mnf-entry-list)


(define manifest (make-manifest all-manifest-entries))
;;; For the fresh version
;;; (define manifest (specifications->manifest specs))

(display "Ready to go.") (newline)

manifest


```

5. Shell command to invoke the environment
```shell
guix environment -m ~/.local/my-scripts/r-manif.scm -c4 --pure -- R
```

After the command is run, just `source('runme.R')`.




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

* bug#50483: [R] Package r-shiny: Shiny server logic inactive
  2021-09-09 12:35 bug#50483: [R] Package r-shiny: Shiny server logic inactive Todor Kondić via Bug reports for GNU Guix
@ 2021-09-15 16:50 ` zimoun
  2021-09-16  5:57   ` Charles via Bug reports for GNU Guix
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2021-09-15 16:50 UTC (permalink / raw)
  To: Todor Kondić; +Cc: charles.b.jackson, 50483

Hi,

Thanks for the report.

IIUC, the package uglify-js from gnu/packages/lisp-xyz was previously
used to minify and now replaced by the new uglifyjs package from the new
gnu/packages/uglifyjs.  Then something is incompatible.

I propose to revert to the Lisp JavaScript compressor instead of the
Node one.  JS people, WDYT?


On jeu., 09 sept. 2021 at 12:35, Todor Kondić <tk.code@protonmail.com> wrote:

> ```r
> library(ggplot2)
> library(shiny)
>
>
> app <- shinyApp(
>     ui = bootstrapPage(
>         numericInput('n', 'Number of obs', 100),
>         plotOutput('plot')
>     ),
>     server = function(input, output) {
>         output$plot <- renderPlot({ hist(runif(input$n)) })
>     }
> )
>
>
> # Will show a warning, because the browser is not in the manifest, but
> # it it will serve the application on a listed port, which means it
> # can be accessed by a browser external to the environment.
> options(browser="itdoesnotmatter")
> shiny::runApp(app)
>
> ```

Using the R script above, and running:

        guix time-machine --commit=<commit>
             -- environment --ad-hoc r r-shiny r-ggplot2
             -- R -e 'source("script.r")'

to bisect, the commit introducing a regression is:

--8<---------------cut here---------------start------------->8---
commit 385c485c651c0b1a467bdbbf31fa723dc4cabd9e
Author: Charles <charles.b.jackson@protonmail.com>
Date:   Mon Jul 12 22:50:44 2021 -0500
    build: Update uglifyjs for minify-build-system.

    * guix/build-system/minify.scm (default-uglify-js): Update uglifyjs package used.
    * guix/build/minify-build-system.scm (minify): Use updated uglifyjs command name.

    Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
 guix/build-system/minify.scm       | 4 ++--
 guix/build/minify-build-system.scm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--8<---------------cut here---------------end--------------->8---

with the Bisect Log (14):

        816d52ba93 bad gnu: Add r-megadepth.
        29745d23b8 good gnu: Use define-public in (gnu packages xiph).
        aa6e6fb2e9 good gnu: Add ytfzf.
        c8bcef2598 bad gnu: sameboy: Update to 0.14.4.
        d84c24935b bad gnu: icedove: Update to 78.12.0 [security fixes].
        026bd0b219 good gnu: r-matrixcalc: Update to 1.0-4.
        7da8f66e52 good gnu: password-store: Fix passmenu paths substitution.
        a49c5488bd good gnu: Add putty.
        b019496fc3 good pack/deb: Add default section and priority fields to the control file.
        bfa847dbe0 good gnu: Add node-acorn.
        3436d3f801 bad gnu: Add emacs-zmq.
        4cda5a4dab bad gnu: git-annex: Update to 8.20210714.
        385c485c65 bad build: Update uglifyjs for minify-build-system.
        d16148fcfd good gnu: Add node-uglify-js.
        385c485c651c0b1a467bdbbf31fa723dc4cabd9e is the first bad commit


Cheers,
simon




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

* bug#50483: [R] Package r-shiny: Shiny server logic inactive
  2021-09-15 16:50 ` zimoun
@ 2021-09-16  5:57   ` Charles via Bug reports for GNU Guix
  2021-09-16  6:32     ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Charles via Bug reports for GNU Guix @ 2021-09-16  5:57 UTC (permalink / raw)
  To: zimoun; +Cc: 50483, Todor Kondić, efraim

Hello, I am responsible to updating the minify build syste to use the updated uglifyjs (now node-uglify-js found in gnu/packages/uglifyjs.scm). When updating I noticed that some R packages had the input uglify-js (the old lisp one). I chose not mess with them at risk of breaking. What I failed to realize is that some R packages (like r-shiny) actually use the minify build-system to do the minifying, thus trying to call the updated uglifyer, while only importing the new one. Other R package like (r-shinytree) do not use the minify build system and instead directly call uglify-js using open-pipe* (these are the ones I didn't want to break).

I would highly suggest against using the old lisp uglifyer since it is outdated by 6 years, and if anyone decides to write some modern javascript, your package will break. Instead simply update the input to ("node-uglify-js" ,node-uglify-js) and don't forget to use module (gnu packages uglifyjs). For the packages like r-shinytree, I would suggest having them use the minify-build system like r-shiny (and also updating to the newer node-uglify-js). I have tested updaing the input, and it works for the ggplot2 example stated earlier in this thread.

Again I'm really sorry for not catching this. It is very late where I am, so if it isn't clear how to update, I can do it tomorrow.




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

* bug#50483: [R] Package r-shiny: Shiny server logic inactive
  2021-09-16  5:57   ` Charles via Bug reports for GNU Guix
@ 2021-09-16  6:32     ` zimoun
  2021-09-18  5:14       ` Charles via Bug reports for GNU Guix
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2021-09-16  6:32 UTC (permalink / raw)
  To: Charles; +Cc: 50483, Todor Kondić

Hi Charles,

On Thu, 16 Sep 2021 at 05:57, Charles <charles.b.jackson@protonmail.com> wrote:
> Hello, I am responsible to updating the minify build syste to use the
> updated uglifyjs (now node-uglify-js found in
> gnu/packages/uglifyjs.scm). When updating I noticed that some R
> packages had the input uglify-js (the old lisp one). I chose not mess
> with them at risk of breaking. What I failed to realize is that some R
> packages (like r-shiny) actually use the minify build-system to do the
> minifying, thus trying to call the updated uglifyer, while only
> importing the new one. Other R package like (r-shinytree) do not use
> the minify build system and instead directly call uglify-js using
> open-pipe* (these are the ones I didn't want to break). 
>
> I would highly suggest against using the old lisp uglifyer since it is
> outdated by 6 years, and if anyone decides to write some modern
> javascript, your package will break. Instead simply update the input
> to ("node-uglify-js" ,node-uglify-js) and don't forget to use module
> (gnu packages uglifyjs). For the packages like r-shinytree, I would
> suggest having them use the minify-build system like r-shiny (and also
> updating to the newer node-uglify-js). I have tested updaing the
> input, and it works for the ggplot2 example stated earlier in this
> thread.

Thanks for explaining.

It is “broken” since:

   CommitDate: Mon Jul 19 14:46:28 2021 +0300

so I propose to revert now or wait a couple of days for a fix.

Efraim, WDYT?

> Again I'm really sorry for not catching this. It is very late where I
> am, so if it isn't clear how to update, I can do it tomorrow.

Do not worry.  That happens. :-) The good is that the situation shows
some limitations and how to improve.

Cheers,
simon







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

* bug#50483: [R] Package r-shiny: Shiny server logic inactive
  2021-09-16  6:32     ` zimoun
@ 2021-09-18  5:14       ` Charles via Bug reports for GNU Guix
  2021-09-20 19:03         ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Charles via Bug reports for GNU Guix @ 2021-09-18  5:14 UTC (permalink / raw)
  To: zimoun; +Cc: 50483, Todor Kondić, efraim

[-- Attachment #1: Type: text/plain, Size: 2303 bytes --]

Here is a patch to update the packages to use the up to date minifier. Is the the correct thread to put this or should I start a new thread in the patches mailing list?

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Thursday, September 16th, 2021 at 1:32 AM, zimoun <zimon.toutoune@gmail.com> wrote:

> Hi Charles,
>
> On Thu, 16 Sep 2021 at 05:57, Charles charles.b.jackson@protonmail.com wrote:
>
> > Hello, I am responsible to updating the minify build syste to use the
> >
> > updated uglifyjs (now node-uglify-js found in
> >
> > gnu/packages/uglifyjs.scm). When updating I noticed that some R
> >
> > packages had the input uglify-js (the old lisp one). I chose not mess
> >
> > with them at risk of breaking. What I failed to realize is that some R
> >
> > packages (like r-shiny) actually use the minify build-system to do the
> >
> > minifying, thus trying to call the updated uglifyer, while only
> >
> > importing the new one. Other R package like (r-shinytree) do not use
> >
> > the minify build system and instead directly call uglify-js using
> >
> > open-pipe* (these are the ones I didn't want to break).
> >
> > I would highly suggest against using the old lisp uglifyer since it is
> >
> > outdated by 6 years, and if anyone decides to write some modern
> >
> > javascript, your package will break. Instead simply update the input
> >
> > to ("node-uglify-js" ,node-uglify-js) and don't forget to use module
> >
> > (gnu packages uglifyjs). For the packages like r-shinytree, I would
> >
> > suggest having them use the minify-build system like r-shiny (and also
> >
> > updating to the newer node-uglify-js). I have tested updaing the
> >
> > input, and it works for the ggplot2 example stated earlier in this
> >
> > thread.
>
> Thanks for explaining.
>
> It is “broken” since:
>
> CommitDate: Mon Jul 19 14:46:28 2021 +0300
>
> so I propose to revert now or wait a couple of days for a fix.
>
> Efraim, WDYT?
>
> > Again I'm really sorry for not catching this. It is very late where I
> >
> > am, so if it isn't clear how to update, I can do it tomorrow.
>
> Do not worry. That happens. :-) The good is that the situation shows
>
> some limitations and how to improve.
>
> Cheers,
>
> simon

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Update-some-packages-using-old-JavaScript-minifi.patch --]
[-- Type: text/x-patch; name=0001-gnu-Update-some-packages-using-old-JavaScript-minifi.patch, Size: 13971 bytes --]

From 57c3801034e77120e4030d0e5421a02343e9280c Mon Sep 17 00:00:00 2001
From: Charles <charles.b.jackson@protonmail.com>
Date: Sat, 18 Sep 2021 00:05:55 -0500
Subject: [PATCH] gnu: Update some packages using old JavaScript minifier.

* gnu/packages/minetest.scm (minetest-basic-trains): New variable.
* gnu/packages/bioinformatics.scm (bismark): Update uglifyjs input.
* gnu/packages/ci.scm (laminar): Update uglifyjs input.
* gnu/packages/cran.scm (r-shiny r-shinytree r-shinydashboard r-colourpicker
r-threejs r-flexdashboard r-networkd3 r-dygraphs): Update uglifyjs input.
* gnu/packages/javascript.scm (): Update uglifyjs input.
---
 gnu/packages/bioinformatics.scm |  6 +++---
 gnu/packages/ci.scm             |  8 ++++----
 gnu/packages/cran.scm           | 32 ++++++++++++++++----------------
 gnu/packages/javascript.scm     | 11 +++++------
 4 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index ee85ab1a06..4f6d7d384a 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -105,7 +105,6 @@
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages jupyter)
   #:use-module (gnu packages linux)
-  #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages lsof)
   #:use-module (gnu packages machine-learning)
@@ -147,6 +146,7 @@
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages uglifyjs)
   #:use-module (gnu packages vim)
   #:use-module (gnu packages web)
   #:use-module (gnu packages wget)
@@ -9284,7 +9284,7 @@ Browser.")
            (lambda* (#:key inputs #:allow-other-keys)
              (let* ((file (assoc-ref inputs "plotly.js"))
                     (installed "plotly/plotly.js"))
-               (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
+               (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
                  (call-with-output-file installed
                    (cut dump-port minified <>))))
              #t))
@@ -9342,7 +9342,7 @@ Browser.")
                                "v1.39.4/dist/plotly.js"))
            (sha256
             (base32 "138mwsr4nf5qif4mrxx286mpnagxd1xwl6k8aidrjgknaqg88zyr"))))
-       ("uglify-js" ,uglify-js)))
+       ("uglifyjs" ,node-uglify-js)))
     (home-page "https://www.bioinformatics.babraham.ac.uk/projects/bismark/")
     (synopsis "Map bisulfite treated sequence reads and analyze methylation")
     (description "Bismark is a program to map bisulfite treated sequencing
diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
index b7ea77ca31..a6d296923f 100644
--- a/gnu/packages/ci.scm
+++ b/gnu/packages/ci.scm
@@ -38,7 +38,7 @@
   #:use-module (gnu packages guile)
   #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages lisp-xyz)
+  #:use-module (gnu packages uglifyjs)
   #:use-module (gnu packages mail)
   #:use-module (gnu packages package-management)
   #:use-module (gnu packages perl)
@@ -252,7 +252,7 @@ intended as a replacement for Hydra.")
                          (let* ((file
                                  (assoc-ref inputs (string-append name ".js")))
                                 (port
-                                 (open-pipe* OPEN_READ "uglify-js" file))
+                                 (open-pipe* OPEN_READ "uglifyjs" file))
                                 (destination
                                  (string-append
                                   "../build/js/" name ".min.js")))
@@ -263,7 +263,7 @@ intended as a replacement for Hydra.")
 
                            (let ((exit (close-pipe port)))
                              (unless (zero? exit)
-                               (error "uglify-js failed" exit)))))
+                               (error "uglifyjs failed" exit)))))
 
                        '("vue"
                          "vue-router"
@@ -282,7 +282,7 @@ intended as a replacement for Hydra.")
        ("zlib" ,zlib)))
     (native-inputs
      `(("googletest" ,googletest)
-       ("uglify-js" ,uglify-js)
+       ("uglifyjs" ,node-uglify-js)
 
        ("vue.js"
         ,(origin (method url-fetch)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index f80256c901..81dd78ac94 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -84,7 +84,7 @@
   #:use-module (gnu packages java)
   #:use-module (gnu packages javascript)
   #:use-module (gnu packages libevent)
-  #:use-module (gnu packages lisp-xyz)
+  #:use-module (gnu packages uglifyjs)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
@@ -2084,7 +2084,7 @@ previewing themes in real time.")
        ("js-strftime" ,js-strftime)
        ("js-highlight" ,js-highlight)))
     (native-inputs
-     `(("uglify-js" ,uglify-js)
+     `(("uglifyjs" ,node-uglify-js)
        ("gfortran" ,gfortran)
        ("js-bootstrap-accessibility"
         ,(origin
@@ -2151,7 +2151,7 @@ responsive, and powerful applications with minimal effort.")
                    (for-each (lambda (source target)
                                (format #t "Processing ~a --> ~a~%"
                                        source target)
-                               (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+                               (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
                                  (call-with-output-file target
                                    (lambda (port)
                                      (dump-port minified port)))))
@@ -2166,7 +2166,7 @@ responsive, and powerful applications with minimal effort.")
     (inputs
      `(("js-requirejs" ,js-requirejs)))
     (native-inputs
-     `(("uglify-js" ,uglify-js)
+     `(("uglifyjs" ,node-uglify-js)
        ("js-jquery"
         ,(origin
            (method url-fetch)
@@ -2204,7 +2204,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
            (lambda _
              (with-directory-excursion "inst/AdminLTE"
                (delete-file "app.min.js")
-               (let ((minified (open-pipe* OPEN_READ "uglify-js" "app.js")))
+               (let ((minified (open-pipe* OPEN_READ "uglifyjs" "app.js")))
                  (call-with-output-file "app.min.js"
                    (lambda (port)
                      (dump-port minified port))))))))))
@@ -2213,7 +2213,7 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
        ("r-promises" ,r-promises)
        ("r-shiny" ,r-shiny)))
     (native-inputs
-     `(("uglify-js" ,uglify-js)))
+     `(("uglifyjs" ,node-uglify-js)))
     (home-page "https://rstudio.github.io/shinydashboard/")
     (synopsis "Create dashboards with shiny")
     (description "This package provides an extension to the Shiny web
@@ -15397,7 +15397,7 @@ to easily call your own custom JavaScript functions from R.")
                                (format #t "Processing ~a --> ~a~%"
                                        source target)
                                (delete-file target)
-                               (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+                               (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
                                  (call-with-output-file target
                                    (lambda (port)
                                      (dump-port minified port)))))
@@ -15413,7 +15413,7 @@ to easily call your own custom JavaScript functions from R.")
        ("r-shinyjs" ,r-shinyjs)))
     (native-inputs
      `(("r-knitr" ,r-knitr)
-       ("uglify-js" ,uglify-js)
+       ("uglifyjs" ,node-uglify-js)
        ("js-jquery"
         ,(origin
            (method url-fetch)
@@ -17903,7 +17903,7 @@ and Learning to Rank measures (LambdaMart).")
                                (format #t "Processing ~a --> ~a~%"
                                        source target)
                                (delete-file target)
-                               (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+                               (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
                                  (call-with-output-file target
                                    (lambda (port)
                                      (dump-port minified port)))))
@@ -17915,7 +17915,7 @@ and Learning to Rank measures (LambdaMart).")
        ("r-htmlwidgets" ,r-htmlwidgets)
        ("r-igraph" ,r-igraph)))
     (native-inputs
-     `(("uglify-js" ,uglify-js)
+     `(("uglifyjs" ,node-uglify-js)
        ("js-jquery"
         ,(origin
            (method url-fetch)
@@ -18175,7 +18175,7 @@ etc.).  Text boxes with automatic word wrap are also supported.")
                    (for-each (lambda (source target)
                                (format #t "Processing ~a --> ~a~%"
                                        source target)
-                               (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+                               (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
                                  (call-with-output-file target
                                    (lambda (port)
                                      (dump-port minified port)))))
@@ -18189,7 +18189,7 @@ etc.).  Text boxes with automatic word wrap are also supported.")
        ("r-rmarkdown" ,r-rmarkdown)
        ("r-shiny" ,r-shiny)))
     (native-inputs
-     `(("uglify-js" ,uglify-js)
+     `(("uglifyjs" ,node-uglify-js)
        ("js-raphael"
         ,(origin
            (method url-fetch)
@@ -20187,14 +20187,14 @@ tools for help in data interpretation.")
                    (for-each (lambda (source target)
                                (format #t "Processing ~a --> ~a~%"
                                        source target)
-                               (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+                               (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
                                  (call-with-output-file target
                                    (lambda (port)
                                      (dump-port minified port)))))
                              sources targets))))
              #t)))))
     (native-inputs
-     `(("uglify-js" ,uglify-js)
+     `(("uglifyjs" ,node-uglify-js)
        ;; NOTE: Make sure that this version of d3 is still valid when
        ;; upgrading the package.
        ("d3.v4.js"
@@ -24540,14 +24540,14 @@ documents, Shiny applications, Plumber APIs, plots, and static web content.")
                    (for-each (lambda (source target)
                                (format #t "Processing ~a --> ~a~%"
                                        source target)
-                               (let ((minified (open-pipe* OPEN_READ "uglify-js" source)))
+                               (let ((minified (open-pipe* OPEN_READ "uglifyjs" source)))
                                  (call-with-output-file target
                                    (lambda (port)
                                      (dump-port minified port)))))
                              sources targets))))
              #t)))))
     (native-inputs
-     `(("uglify-js" ,uglify-js)
+     `(("uglifyjs" ,node-uglify-js)
        ;; They actually use version 1.11.1, but this more recent version
        ;; should be just fine.
        ("js-jquery"
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 81de5b67a6..e107dd6126 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -26,7 +26,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages lisp-xyz)
+  #:use-module (gnu packages uglifyjs)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages web)
   #:use-module (guix packages)
@@ -163,14 +163,14 @@ context menu in TypeScript.")
                 (cond
                  ((string-match "\\.js$" file)
                   (mkdir-p (dirname installed))
-                  (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
+                  (let ((minified (open-pipe* OPEN_READ "uglifyjs" file)))
                     (call-with-output-file installed
                       (lambda (port)
                         (dump-port minified port)))
 
                     (let ((exit (close-pipe minified)))
                       (unless (zero? exit)
-                        (error "dear, uglify-js failed" exit)))))
+                        (error "dear, uglifyjs failed" exit)))))
                  (else
                   (install-file file (dirname installed))))))
             (find-files "."))
@@ -179,7 +179,7 @@ context menu in TypeScript.")
     (native-inputs
      `(("font-mathjax" ,font-mathjax)
        ("glibc-utf8-locales" ,glibc-utf8-locales)
-       ("uglify-js" ,uglify-js)
+       ("uglifyjs" ,node-uglify-js)
        ,@(package-native-inputs font-mathjax)))
     (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath")
     (description "MathJax is a JavaScript display engine for LaTeX, MathML,
@@ -527,8 +527,7 @@ means that these shams cause many ES5 methods to silently fail.")
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-uglification
-           ;; Remove "export" keyword which prevents the file from being
-           ;; uglified by uglify-js.  Moreover, that keyword is not present in
+           ;; Remove "export" keyword. That keyword is not present in
            ;; the minified version of the library some projects are using,
            ;; e.g.,
            ;; <https://github.com/jmoenig/Snap--Build-Your-Own-Blocks/blob/master/FileSaver.min.js>
-- 
2.32.0


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

* bug#50483: [R] Package r-shiny: Shiny server logic inactive
  2021-09-18  5:14       ` Charles via Bug reports for GNU Guix
@ 2021-09-20 19:03         ` zimoun
  2021-09-20 19:30           ` Charles via Bug reports for GNU Guix
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2021-09-20 19:03 UTC (permalink / raw)
  To: Charles; +Cc: 50483, Todor Kondić

Hi Charles,

Thanks for the patch.

On Sat, 18 Sep 2021 at 05:14, Charles <charles.b.jackson@protonmail.com> wrote:

> Here is a patch to update the packages to use the up to date
> minifier. Is the the correct thread to put this or should I start a
> new thread in the patches mailing list?

I think the bestis to send this patch to guix-patches@gnu.org.  See
commit message and suggestions below.


> From 57c3801034e77120e4030d0e5421a02343e9280c Mon Sep 17 00:00:00 2001
> From: Charles <charles.b.jackson@protonmail.com>
> Date: Sat, 18 Sep 2021 00:05:55 -0500
> Subject: [PATCH] gnu: Update some packages using old JavaScript minifier.

Subject: [PATCH] gnu: Switch to (gnu package uglifyjs) minifier.

Fixes <https://bugs.gnu.org/50483>

> * gnu/packages/minetest.scm (minetest-basic-trains): New variable.
> * gnu/packages/bioinformatics.scm (bismark): Update uglifyjs input.
> * gnu/packages/ci.scm (laminar): Update uglifyjs input.
> * gnu/packages/cran.scm (r-shiny r-shinytree r-shinydashboard r-colourpicker
> r-threejs r-flexdashboard r-networkd3 r-dygraphs): Update uglifyjs input.
> * gnu/packages/javascript.scm (): Update uglifyjs input.

Missing package               --^


I have not compiled, so I assume this removal:

> -  #:use-module (gnu packages lisp-xyz)

does not trigger warning when compiling Guix, right?


> diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm
> index b7ea77ca31..a6d296923f 100644
> --- a/gnu/packages/ci.scm
> +++ b/gnu/packages/ci.scm
> @@ -38,7 +38,7 @@
>    #:use-module (gnu packages guile)
>    #:use-module (gnu packages guile-xyz)
>    #:use-module (gnu packages gnupg)
> -  #:use-module (gnu packages lisp-xyz)
> +  #:use-module (gnu packages uglifyjs)

It seems the module are sorted by alphabetic order.

> diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
> index f80256c901..81dd78ac94 100644
> --- a/gnu/packages/cran.scm
> +++ b/gnu/packages/cran.scm
> @@ -84,7 +84,7 @@
>    #:use-module (gnu packages java)
>    #:use-module (gnu packages javascript)
>    #:use-module (gnu packages libevent)
> -  #:use-module (gnu packages lisp-xyz)
> +  #:use-module (gnu packages uglifyjs)

Idem.

> diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
> index 81de5b67a6..e107dd6126 100644
> --- a/gnu/packages/javascript.scm
> +++ b/gnu/packages/javascript.scm
> @@ -26,7 +26,7 @@
>    #:use-module (gnu packages)
>    #:use-module (gnu packages base)
>    #:use-module (gnu packages compression)
> -  #:use-module (gnu packages lisp-xyz)
> +  #:use-module (gnu packages uglifyjs)

Idem.


Otherwise, LGTM. Thanks.


Cheers,
simon




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

* bug#50483: [R] Package r-shiny: Shiny server logic inactive
  2021-09-20 19:03         ` zimoun
@ 2021-09-20 19:30           ` Charles via Bug reports for GNU Guix
  0 siblings, 0 replies; 7+ messages in thread
From: Charles via Bug reports for GNU Guix @ 2021-09-20 19:30 UTC (permalink / raw)
  To: zimoun; +Cc: 50483, Todor Kondić, efraim

Thanks simon, I will take into account your suggestions and submit to patches.





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

end of thread, other threads:[~2021-09-20 19:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 12:35 bug#50483: [R] Package r-shiny: Shiny server logic inactive Todor Kondić via Bug reports for GNU Guix
2021-09-15 16:50 ` zimoun
2021-09-16  5:57   ` Charles via Bug reports for GNU Guix
2021-09-16  6:32     ` zimoun
2021-09-18  5:14       ` Charles via Bug reports for GNU Guix
2021-09-20 19:03         ` zimoun
2021-09-20 19:30           ` Charles via Bug reports for GNU Guix

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 NNTP newsgroup(s).