Bug 1325805 - nodejs-less should require nodejs-promise
Summary: nodejs-less should require nodejs-promise
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: nodejs-less
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-11 09:07 UTC by Ingo van Lil
Modified: 2016-04-25 18:22 UTC (History)
5 users (show)

Fixed In Version: nodejs-less-2.6.1-2.fc23.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 19:22:17 UTC
Type: Bug
Embargoed:
inguin: needinfo-


Attachments (Terms of Use)

Description Ingo van Lil 2016-04-11 09:07:19 UTC
Description of problem:
nodejs-less should require nodejs-promise. Without it the included lessc binary will silently fail.

Version-Release number of selected component (if applicable):
2.6.1

How reproducible:
100%

Steps to Reproduce:
1. Install nodejs-less, do not install nodejs-promise
2. Invoke lessc with a test .less file

Actual results:
No error message, no output

Expected results:
Generated CSS on stdout

Comment 1 Stephen Gallagher 2016-04-11 13:31:58 UTC
Upstream has `promise` listed as an optionalDependency, meaning that it should only be needed sometimes. Could you explain more about the failure?

Please provide an example .less file and the command-line arguments you passed to it.

Comment 2 Stephen Gallagher 2016-04-11 13:49:09 UTC
FWIW, I can prove that the following works without nodejs-promise installed:

Create a file called test.less:
```
@bg: #a1a1a1;

body {
  background: @bg;
}
```

`less - < test.less`

Works just fine, outputs:
```
body {
  background: #a1a1a1;
}
```


So nodejs-promise is definitely not a strict requirement for Less.js, but if you can show me proof that it's not commonly-useful without it, I'll add a Recommends: npm(promise) to the dependencies so nodejs-promise will be added by default.

Comment 3 Ingo van Lil 2016-04-11 13:54:50 UTC
(In reply to Stephen Gallagher from comment #1)

> Upstream has `promise` listed as an optionalDependency, meaning that it
> should only be needed sometimes. Could you explain more about the failure?

The method less.render() supports two signatures, one with callback and one with promise. Examples:

1) With callback:

less.render('.class { width: (1 + 1) }',
            function(e, output) { console.log(output); });

2) With promise:

var promise = less.render('.class { width: (1 + 1) }');
promise.then(function(result) { console.log(result); });

/usr/bin/lessc uses the second form in lines 457 ff. Without node-promise installed the tool will not output any CSS or errors on my system.


> Please provide an example .less file and the command-line arguments you
> passed to it.

I can reproduce it with any input, e.g.:

echo '.class { width: 1+1 }' | lessc -

Comment 4 Stephen Gallagher 2016-04-11 14:19:35 UTC
(In reply to Ingo van Lil from comment #3)
> (In reply to Stephen Gallagher from comment #1)
> 
> > Upstream has `promise` listed as an optionalDependency, meaning that it
> > should only be needed sometimes. Could you explain more about the failure?
> 
> The method less.render() supports two signatures, one with callback and one
> with promise. Examples:
> 
> 1) With callback:
> 
> less.render('.class { width: (1 + 1) }',
>             function(e, output) { console.log(output); });
> 
> 2) With promise:
> 
> var promise = less.render('.class { width: (1 + 1) }');
> promise.then(function(result) { console.log(result); });
> 
> /usr/bin/lessc uses the second form in lines 457 ff. Without node-promise
> installed the tool will not output any CSS or errors on my system.
> 
> 
> > Please provide an example .less file and the command-line arguments you
> > passed to it.
> 
> I can reproduce it with any input, e.g.:
> 
> echo '.class { width: 1+1 }' | lessc -

You're right. I was doing all of my testing against Node.js 5.10.1, which works fine without the promises module. Looks like F23 *does* need this as an explicit Requires:, which I will add right now.

Comment 5 Fedora Update System 2016-04-11 15:03:42 UTC
nodejs-less-2.6.1-2.fc23.1 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6bb8d63389

Comment 6 Fedora Update System 2016-04-11 15:03:50 UTC
nodejs-less-2.6.1-2.fc23.1 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6bb8d63389

Comment 7 Fedora Update System 2016-04-13 09:29:25 UTC
nodejs-less-2.6.1-2.fc23.1 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6bb8d63389

Comment 8 Fedora Update System 2016-04-20 19:22:12 UTC
nodejs-less-2.6.1-2.fc23.1 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.