Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
Control: tags -1 moreinfo + pending On 25-Feb-2018, Ben Finney wrote: > * Load the test page ‘atwho-bug890391-test.html’ with the debugger > enabled. > > The JavaScript engine will report a “ReferenceError”, shown in the > console. > > This allows us to verify the reported behaviour. With changes to use the Gulp build system for compiling CoffeeScript, the resulting library now causes no ‘ReferenceError’, and the test file works correctly. I have uploaded a new version with those changes, to resolve this bug. -- \ “Nothing worth saying is inoffensive to everyone. Nothing worth | `\saying will fail to make you enemies. And nothing worth saying | _o__)will not produce a confrontation.” —Johann Hari, 2011 | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On 25-Feb-2018, Pirate Praveen wrote: > https://wiki.debian.org/Javascript/Nodejs#Using_build_tools_like_grunt Ah, that didn't show up when I searched for Debian and Gulp :-) > You can just call gulp from debian/rules. […] > > $ npm2deb depends -r at.js > Module at.js has no dependencies. > Build dependencies: > NPM Debian > […] Great, thank you. I'll work from that list. -- \ “I cannot conceive that anybody will require multiplications at | `\ the rate of 40,000 or even 4,000 per hour …” —F. H. Wales, 1936 | _o__) | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On 25-Feb-2018, Balasankar C wrote: > PS: In case you were asking how the CDN is related to upstream […] I was asking (too curtly, my apology) both “what's the difference between the official release, and that file?” and “what's special about the CDN version, that would make that better to look at than the official release?” Thank you for the answer. This is made moot, I think, when we see that the bug appears to be a problem in the unofficial build actions. So that would explain why it doesn't change when gettin the source from a different location :-) -- \ “The face of a child can say it all, especially the mouth part | `\of the face.” —Jack Handey | _o__) | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On Sun, 25 Feb 2018 14:47:19 +1100 Ben Finneywrote: > On 25-Feb-2018, Balasankar C wrote: > > > Note: I have enabled the atwho JS file from cloudflare CDN in it. > > How is that related to the upstream source? These days most browser libraries are developed in a node.js environment and the output of these source files are generated by tools (module bundlers) like browserify, rollup and webpack (in this particular case I think gulp-umd + gulp-concat and other gulp plugins). cloudflare CDN is distributing the output of these source files (generated using gulp). Because browsers don't implement all APIs of Nodejs, we cannot directly use these source files, but need to use a module bundler like webpack (we have two module bundlers in debian now - webpack and rollup). I have been replacing many of the build scripts to use webpack instead of rollup for some time (as rollup was accepted only a week back). Many times, there is also an extra step of transpiling before we can bundle the modules. A transpiler like babel or buble (both now available in main), convert code written in ES6 version of javascript to ES5 that browsers understand. In this particular case, we don't have the transpile step and we directly bundle the modules using gulp-umd and gulp-concat. signature.asc Description: OpenPGP digital signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
Hi, On Sun, 25 Feb 2018 14:47:19 +1100 Ben Finneywrote: > On 25-Feb-2018, Balasankar C wrote: > > > Note: I have enabled the atwho JS file from cloudflare CDN in it. > > How is that related to the upstream source? You can ignore that. I just wanted to demo a working copy first so that we can see how switching to the packaged one broke the test. Hence made use of the CDN. It was only meant to show "Upstream one works, packaged one doesn't.". :) PS: In case you were asking how the CDN is related to upstream, check this link: https://cdnjs.com/libraries/at.js . It hosts all the versions of the library in a central location that websites can use via
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On Sun, 25 Feb 2018 15:03:45 +1100 Ben Finneywrote: > On 15-Feb-2018, Pirate Praveen wrote: > > > wget `npm view at.js dist.tarball` will get you the dist tarball. > > Compare dist/js/jquery.atwho.js in the tarball with the file installed > > by the debian package. > > (There is no ‘npm’ in Debian Buster yet, so I'm not easily able to get > anything from NPM.) You can just use wget to get the files from npm registry. $ npm view at.js dist.tarball https://registry.npmjs.org/at.js/-/at.js-1.5.3.tgz (it is the same pattern for all npm modules) $ wget https://registry.npmjs.org/at.js/-/at.js-1.5.3.tgz > Looking at the ‘/usr/share/javascript/jquery-atwho/jquery.atwho.js’ > file installed by the Debian package, I see that the Reference Error > is because ‘Controller’ is defined in a different scope. > > As you have suggested, the custom build rules in the Debian package > were implemented before we had Gulp in Debian. So the build process > may be to blame for the error behaviour. > > What should be done in this package to use the ‘gulpfile.js’ tasks, > now that Gulp is available in Debian? https://wiki.debian.org/Javascript/Nodejs#Using_build_tools_like_grunt You can just call gulp from debian/rules. But you may need to package some gulp plugins or embed them https://wiki.debian.org/Javascript/Nodejs/Npm2Deb#Embedding_some_modules some of them plugins you may be able to skip. $ npm2deb depends -r at.js Module at.js has no dependencies. Build dependencies: NPM Debian gulp (^3.9.0) node-gulp (3.9.1-6) gulp-bump (^1.0.0)None gulp-coffee (^2.3.1) node-gulp-coffee (2.3.4-1) gulp-concat (^2.6.0) node-gulp-concat (2.6.1-1) gulp-cssmin (^0.1.7) None gulp-debug (^2.1.2) None gulp-header (^1.7.1) None gulp-jasmine (^2.2.1) None gulp-jasmine-phantom (^2.0.1) None gulp-rename (^1.2.2) node-gulp-rename (1.2.2-1) gulp-uglify (^1.5.1) None gulp-umd (^0.2.0) None gulp-util (^3.0.7)node-gulp-util (3.0.7-1) jasmine-ajax (^3.2.0) None jasmine-jquery (^2.1.1) None phantomjs (^1.9.19) None We can skip phantomjs and jasmine in the first iteration and enable tests later. For skipping some modules, you have to patch the gulpfile.js. signature.asc Description: OpenPGP digital signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On 15-Feb-2018, Pirate Praveen wrote: > wget `npm view at.js dist.tarball` will get you the dist tarball. > Compare dist/js/jquery.atwho.js in the tarball with the file installed > by the debian package. (There is no ‘npm’ in Debian Buster yet, so I'm not easily able to get anything from NPM.) Looking at the ‘/usr/share/javascript/jquery-atwho/jquery.atwho.js’ file installed by the Debian package, I see that the Reference Error is because ‘Controller’ is defined in a different scope. As you have suggested, the custom build rules in the Debian package were implemented before we had Gulp in Debian. So the build process may be to blame for the error behaviour. What should be done in this package to use the ‘gulpfile.js’ tasks, now that Gulp is available in Debian? -- \“Science doesn't work by vote and it doesn't work by | `\authority.” —Richard Dawkins, _Big Mistake_ (The Guardian, | _o__) 2006-12-27) | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
Control: tags -1 - unreproducible + confirmed Control: found -1 libjs-jquery-atwho/1.5.4+dfsg.1-1 On 25-Feb-2018, Balasankar C wrote: > Attaching an html test file. It uses the libjs-jquery-caret.js > package you have in experimental along with the libjs-query-atwho > package in question. Thank you. I have modified that so that it simply uses the Debian-installed package, to show the error (and to use the same file unchanged to test for whatever fix is implemented). The test file is attached to this message. The steps I am using to reproduce the behaviour: * Install ‘libjs-jquery-caret.js’ version “0.3.1+dfsg.1-2” or later (now available in Debian “unstable”). * Install ‘libjs-jquery-atwho’. * Open a web browser with a debugger. (I am using Firefox.) * Load the test page ‘atwho-bug890391-test.html’ with the debugger enabled. The JavaScript engine will report a “ReferenceError”, shown in the console. This allows us to verify the reported behaviour. This behaviour is present in version “1.5.3+dfsg.1-1”: ReferenceError: Controller is not defined jquery.atwho.min.js:1:10662 and, using the same test case, also in version “1.5.4+dfsg.1-1”: ReferenceError: Controller is not defined jquery.atwho.min.js:1:10634 Version “1.5.4” is the latest available from upstream. There are (apparently?) no relevant upstream changes since that version that would address this bug. So unless I have misunderstood the bug, or there are changes in the upstream source that address this bug, we need some fix that upstream has not yet implemented. -- \“Are you pondering what I'm pondering, Pinky?” “Sure, Brain, | `\ but how are we going to find chaps our size?” —_Pinky and The | _o__) Brain_ | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On 25-Feb-2018, Balasankar C wrote: > Note: I have enabled the atwho JS file from cloudflare CDN in it. How is that related to the upstream source? -- \ “We have clumsy, sputtering, inefficient brains…. It is a | `\ *struggle* to be rational and objective, and failures are not | _o__) evidence for an alternative reality.” —Paul Z. Myers, 2010-10-14 | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
Heya, On Fri, 16 Feb 2018 06:10:36 +1100 Ben Finneywrote: > What I need is some simple script that I can run in a minimal Debian > environment, first to show the behaviour in this package and, after > making changes to the package, then to test whether the behaviour is > correct. Attaching an html test file. It uses the libjs-jquery-caret.js package you have in experimental along with the libjs-query-atwho package in question. Testing: Note: I have enabled the atwho JS file from cloudflare CDN in it. 1. Open your browser and open the console debugger (In Firefox, press Ctrl-Shift-j) 1. Open the attached file atwho-test.html in browser 2. Try typing `@` to the textbox, and see three names pop up. It means the CDN one is working 3. Now comment the line which uses CDN and uncomment the one which uses the packaged one. Save and exit. 4. Refresh the webpage, while keeping an eye on the debugger. You can see the errors mentioned in this bug report pop up there. 5. Type `@` in the textbox and confirm nothing happens. It means the packaged one is broken. Please fix the package. Regards Balasankar C Debian Developer signature.asc Description: OpenPGP digital signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
[copying the javascript maintainers list] On Fri, 23 Feb 2018 11:37:31 +1100 Ben Finneywrote: > Control: tags -1 + unreproducible I don't think this really a productive way of collaboration when two people already reproduced this issue. > On 16-Feb-2018, Ben Finney wrote: > > > What I need is some simple script that I can run in a minimal Debian > > environment, first to show the behaviour in this package and, after > > making changes to the package, then to test whether the behaviour is > > correct. > > Lacking that, I am unable to reproduce the reported behaviour. I don't think that is helpful at multiple levels. 1. It is clearly reproduce-able as two people already confirmed this bug. 2. You can easily compare the upstream built files. You just need to inspect the two files. 3. When you are creating a custom build system, you are expected to make sure it produces a result compatible with the original upstream build system. Look at libjs-jquery as an example. 4. Refusing to use the upstream provided build system just makes this really hard to support as you have already demonstrated in your response. It also means you are making the barrier of collaboration unreasonably high. This method was a last resort option when the build tools were not packaged. But now when grunt, gulp, webpack, babel all are available in main, still insisting on your custom reverse engineered build script is not helpful. 5. It is even more ironic since gitlab is the only reverse dependency for this library currently. signature.asc Description: OpenPGP digital signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
Control: tags -1 + unreproducible On 16-Feb-2018, Ben Finney wrote: > What I need is some simple script that I can run in a minimal Debian > environment, first to show the behaviour in this package and, after > making changes to the package, then to test whether the behaviour is > correct. Lacking that, I am unable to reproduce the reported behaviour. -- \ “If you make people think they're thinking, they'll love you; | `\ but if you really make them think, they'll hate you.” —Donald | _o__) Robert Perry Marquis | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On 15-Feb-2018, Pirate Praveen wrote: > On വ്യാഴം 15 ഫെബ്രുവരി 2018 01:10 രാവിലെ, Ben Finney wrote: > > For reference in this bug report, can you please give complete > > steps to reproduce with the current Debian package? > > > Install gitlab 9.5.4 from experimental/contrib and visit gitlab > instance. […] You will have to replace the symlink created here […] > > I think it would be easier for you to compare the file shipped by > at.js node module than setting up a gitlab instance. I agree that the steps above are not really simple for demonstrating the error :-) Given that, can you show a simple script instead, that will just show the error in the Debian ‘libjs-jquery-atwho’ package? What I need is some simple script that I can run in a minimal Debian environment, first to show the behaviour in this package and, after making changes to the package, then to test whether the behaviour is correct. -- \ “We are human only to the extent that our ideas remain humane.” | `\ —_Breakfast of Champions_, Kurt Vonnegut | _o__) | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
On വ്യാഴം 15 ഫെബ്രുവരി 2018 01:10 രാവിലെ, Ben Finney wrote: > This bug report (bug#890391) begins with that message, and no > information on the error or steps to reproduce. > > For reference in this bug report, can you please give complete steps > to reproduce with the current Debian package? > Install gitlab 9.5.4 from experimental/contrib and visit gitlab instance. For now, I have added a work around to not use the packaged version and instead use at.js module from npm (you will have to undo this workaorund). You will have to replace the symlink created here https://salsa.debian.org/ruby-team/gitlab/blob/debian/9.5.4+dfsg-5/debian/gitlab.links#L19 to packaged version and run webpack and assets precompile steps as given below. https://salsa.debian.org/ruby-team/gitlab/blob/debian/9.5.4+dfsg-5/debian/rake-tasks.sh#L42 I think it would be easier for you to compare the file shipped by at.js node module than setting up a gitlab instance. wget `npm view at.js dist.tarball` will get you the dist tarball. Compare dist/js/jquery.atwho.js in the tarball with the file installed by the debian package. signature.asc Description: OpenPGP digital signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
Control: tags -1 + moreinfo On 14-Feb-2018, Pirate Praveen wrote: > Originally reported with full error log at > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890333 and I was > able to reproduce it in my system. This bug report (bug#890391) begins with that message, and no information on the error or steps to reproduce. For reference in this bug report, can you please give complete steps to reproduce with the current Debian package? -- \ “I have a map of the United States; it's actual size. It says | `\‘1 mile equals 1 mile’. Last summer, I folded it.” —Steven | _o__) Wright | Ben Finneysignature.asc Description: PGP signature
Bug#890391: libjs-jquery-atwho: ReferenceError: Controller is not defined
Package: libjs-jquery-atwho Version: 1.5.3+dfsg.1-1 Severity: grave Justification: makes the package unuseable Control: block 890333 by -1 Originally reported with full error log at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890333 and I was able to reproduce it in my system. gulp is now packaged, so may be its a good idea to use the upstream build system (so its easier to support the package than learning a custom build script). Also if it were part of javascript packaging team repos, I could have helped directly. signature.asc Description: OpenPGP digital signature