-
Notifications
You must be signed in to change notification settings - Fork 224
#1513: Print source of assemblies dependencies in dnu list --assembly #1611
Conversation
{ | ||
// determine if keep walking down the path | ||
if (ancestors.Any(a => a == assembly)) | ||
if (ancestors.Any(a => a == assemblyName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string.Equals
Ping ⌚ |
root.DepthFirstPreOrderWalk(visitNode: (node, _) => VisitLibrary(node, _, libraries, assemblies)); | ||
root.DepthFirstPreOrderWalk(visitNode: (node, _) => VisitLibrary(node, _, libraries)); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too much /r/n!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will clean up.
I think you should invert it. Have a --detailed or a --verbose flag that shows more information. |
We need to ensure the same experience between listing packages and assembly. So both by default just list the dependencies and use |
d04ee4e
to
c8fac7b
Compare
rebased and updated. /cc @davidfowl ⌚ |
7739575
to
e803d3d
Compare
/cc @davidfowl @BrennanConroy @ChengTian Adding functional actually testing
|
{ | ||
var assemblies = new HashSet<string>(); | ||
_assemblyFilePaths = new HashSet<string>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StringComparer.Ordinal
(also for the dictionaries).
Looks like test fails on mono. I'm looking at it. |
⌚ /cc @davidfowl |
Also address: #1644 |
string stdOut, stdErr; | ||
Assert.Equal(0, DnuTestUtils.ExecDnu(runtimeHomePath, "list", "--details", out stdOut, out stdErr, environment: null, workingDir: _workingDir.DirPath)); | ||
|
||
string[] outputLines = stdOut.Split(Environment.NewLine[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you grabbing potentially only part of the newline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Environment.NewLine[0]
in both situation is \n
. In the following assertions string.Contains
is used to examine the content. It is safe.
⌚ comments |
string stdOut, stdErr; | ||
Assert.Equal(0, DnuTestUtils.ExecDnu(runtimeHomePath, "list", "", out stdOut, out stdErr, environment: null, workingDir: _workingDir.DirPath)); | ||
|
||
var hits = stdOut.Split('\n').Where(line => line.Contains("* alpha 0.1.0")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using newline.
c9e1ddd
to
662c4d9
Compare
CI build fails because of myget failing. |
No they aren't:
|
You caught me. Failure indeed happens on AppVeyor after I put out the statement. |
662c4d9
to
f9479ce
Compare
continuous-integration/travis-ci/pr fails for
|
/cc @davidfowl @BrennanConroy ⌚ |
Looks good to go. |
Ping @davidfowl |
f9479ce
to
4275745
Compare
I'll merge this change today. |
1. Move DnuListTestContext to its own file; 2. Remove unecessary methods; 3. Use Environment.NewLine to split output.
4275745
to
5b4d445
Compare
Issue: #1513
Sample:
To get a clean list, using