Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import-once subdirectory test fail #892

Closed
dmcass opened this issue Aug 11, 2012 · 4 comments
Closed

import-once subdirectory test fail #892

dmcass opened this issue Aug 11, 2012 · 4 comments

Comments

@dmcass
Copy link
Contributor

dmcass commented Aug 11, 2012

@agatronic I noticed a regression today when working on a PR for another bug. Commit a702b28 introduced a bug in @import-once functionality which is visible in the tests. The import-once test demonstrates the issue well enough.

import-once.less

@import-once "import/import-once-test-c";
@import-once "import/import-once-test-c";
@import-once "import/deeper/import-once-test-a";

import/import-once-test-c.less

@import-once "import-test-d.css";
@c: red;

#import {
  color: @c;
}

import/deeper/import-once-test-a.less

@import-once "../import-test-d.css";

output

@import "import-test-d.css";

@import "../import-test-d.css";
#import {
  color: #ff0000;
}

Don't have a chance to look into it right now, and you're more familiar with that part of the codebase than I am.

@lukeapage
Copy link
Member

As the commit message says, its not a regression. I fixed a bug that was making less ignore import statements depending on the order of the io... You actually get the fail 1 time in 8 before the fix and this made it deterministic.

The problem is summed up in other bugs.. the CSS path isn't being adjusted, therefore actually import_once is correct as its referencing 2 different paths.

I left the tests failing as import behaviour needs to be sorted out.

@dmcass
Copy link
Contributor Author

dmcass commented Aug 11, 2012

Ah, sorry for the confusion then. I misunderstood the commit message.

@lukeapage
Copy link
Member

@cloudhead

Please could you take some time to state how you think it should work? e.g.

  1. Should all urls be adjusted to be relative to the base path for both node.js and browser (or was this functionality purposefully removed) and if it should be fixed or put back in, should it be controlled by an option
  2. should there be a difference between url("") and "" in terms of the way it is adjusted?

@lukeapage
Copy link
Member

basically the node code never adjusts the paths. This is pretty fairly discussed in #331 so closing this as a duplicate. I have fixed the test until 331 is sorted out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants