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

Dependencies are in the wrong order #19

Closed
blastrock opened this issue Jul 24, 2019 · 3 comments · Fixed by #20
Closed

Dependencies are in the wrong order #19

blastrock opened this issue Jul 24, 2019 · 3 comments · Fixed by #20
Labels
bug Something isn't working

Comments

@blastrock
Copy link

When using the following list:

          languages: [
            'clike',
            'bash',
            'cpp',
            'go',
            'java',
            'javascript',
            'json',
            'kotlin',
            'shell',
            'objectivec',
            'swift',
          ],

The final list is:

[ 'java',
  'clike',
  'c',
  'cpp',
  'go',
  'bash',
  'javascript',
  'json',
  'kotlin',
  'objectivec',
  'swift' ]

which is broken because java depends on clike.

I don't know why peerDependencies is used to order dependencies, but it seems like it works better with requires.

Related: #3

@mAAdhaTTah
Copy link
Owner

Thanks for the bug report. peerDependencies are used because components modify their peers, so the peers need to be loaded first so they can be modified.

@mAAdhaTTah mAAdhaTTah added the bug Something isn't working label Jul 24, 2019
mAAdhaTTah added a commit that referenced this issue Jul 24, 2019
mAAdhaTTah added a commit that referenced this issue Jul 24, 2019
@mAAdhaTTah
Copy link
Owner

Just pubbed v1.1.1, which should resolve this.

@blastrock
Copy link
Author

Thanks for the quick response and the explanation!

1.1.1 does fix the issue I opened, however this new list breaks it:

          languages: [
    "bash",
    "cpp",
    "go",
    "java",
    "javascript",
    "json",
    "kotlin",
    "shell",
    "objectivec",
    "swift"
          ],

It is the same list as before, but without "clike". It produces the following sorted list:

[ 'java',
  'bash',
  'c',
  'cpp',
  'go',
  'clike',
  'javascript',
  'json',
  'kotlin',
  'objectivec',
  'swift' ]

which is broken for the same reason: java depends on clike.

We use node v10.15.2 which is < 12 as you guessed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants