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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix merge error if there are two files with the same name #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tschoartschi
Copy link

@tschoartschi tschoartschi commented Jul 27, 2017

I develop an addon which I test with the tests/dummy/app. If there is a file with the same name in addon/styles and tests/dummy/app/styles the build crashes. To reproduce the crash just create a file with the name conflict.scss in both directories. The you will see the following exception:

Error: Merge error: file styles/conflict.sass-lint-test.js exists in /Users/user/Projects/webclient/tmp/broccoli_merge_trees-input_base_path-pfqHcQSE.tmp/0 and /Users/user/Projects/webclient/tmp/broccoli_merge_trees-input_base_path-pfqHcQSE.tmp/1
Pass option { overwrite: true } to mergeTrees in order to have the latter file win.

This pull request tries to fix this issue. I'm not an expert with the broccoli build tool but this fix resolves my issue. I'm not sure if this breaks anything else especially not because I was not able to get the test suite running. Please have a look and let me know what you think 馃槂

This makes it possible that there can be files with the same name
in addon and tests/dummy/app folder
@tomasbasham
Copy link
Owner

What versions of Node and Ember are you using? I cannot seem to reproduce this error. I have created a small test addon. Is this at least similar to your addon setup?

@tschoartschi
Copy link
Author

tschoartschi commented Jul 28, 2017

I forgot to mention that you need to specify the following options:

scssLintOptions: {
  includePaths: [
    'addon'
  ]
}

Otherwise the files in addon/styles are not linted. My current setup is

ember-cli: 2.13.2
node: 8.1.3
npm: 5.0.3
os: darwin x64
ember-cli-scss-lint: tried master and 2.2.0
ember-cli-sass: 6.2.0

@tomasbasham
Copy link
Owner

OK, got it. There is actually another issue related to the test files #14 that I need to investigate further. Although quite separate from this issue I will have to rethink how these files are generated.

@tschoartschi
Copy link
Author

@tomasbasham cool. I'm happy that I could help you reproduce the bug. Let me know if I can help any further

@tschoartschi
Copy link
Author

Any news on this issue / merge request?

@roomle-build
Copy link

We have a very similar issue. This pull request seems to fix our problems. Is it good to merge?

@tomasbasham
Copy link
Owner

The tests are not passing so I'll need to investigate why first.

@roomle-build
Copy link

@tomasbasham thanks for the quick response. I can use @tschoartschi branch in the meantime

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

Successfully merging this pull request may close these issues.

None yet

3 participants