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

#893187 - support multiple dSYMs upload #3580

Merged
merged 1 commit into from
Feb 15, 2017
Merged

Conversation

AlexRukhlin
Copy link
Contributor

No description provided.

@msftclas
Copy link

msftclas commented Feb 9, 2017

Hi @AlexRukhlin, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Alex Rukhlin). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

}
})
} else {
let simbolsFile = utils.resolveSinglePath(symbolsPathPattern, continueIfSymbolsNotFound, packParentFolder);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"simbolsFile" -> "symbolsFile"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@davidstaheli davidstaheli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I added a minor comment and another important consideration about supporting backslashes on Windows.

if (pattern) {
let matches: string[] = tl.glob(pattern);
let matches = tl.glob(pattern);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove type info (: string[])?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type is defined by the right side of assignment.


return commonParent.join("/");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also support Windows-style paths with backslashes ("")?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we do not need that. Paths processed in this method always have forward slashes (even in Windows).

export function removeDuplicates(list: string[]): string[] {
let unique: string[] = [];

list.forEach(s => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested, not sure if works. Arrays in JavaScript are associative arrays, I think we can avoid the "find" call if you just push each element in list as a key in the array, and get all unique values from Object.keys(array) call. Again I didn't test this yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> a
[ 'a/b', 'b', 'a', 'a/b' ]
> b = []
[]
> a.forEach(function(s) {b[s] = 1})
undefined
> Object.keys(b)
[ 'a/b', 'b', 'a' ]

Seems working.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -6,7 +6,7 @@ import fs = require('fs');

import { ToolRunner } from 'vsts-task-lib/toolrunner';

var utils = require('./utils.js');
import utils = require('./utils');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some problem mocking this if it's "import"ed. You can try and see if mock works.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

let dsymPaths = utils.resolvePaths(symbolsPathPattern, continueIfSymbolsNotFound, packParentFolder);

dsymPaths.forEach(dsymFolder =>
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opening brace should be on the same line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@AlexRukhlin AlexRukhlin force-pushed the users/arukhlin/us893187 branch 4 times, most recently from 6ee3633 to df3f902 Compare February 12, 2017 15:04
@AlexRukhlin AlexRukhlin force-pushed the users/arukhlin/us893187 branch from df3f902 to 4caeec7 Compare February 14, 2017 23:03
@AlexRukhlin AlexRukhlin merged commit 11b799c into master Feb 15, 2017
@AlexRukhlin AlexRukhlin deleted the users/arukhlin/us893187 branch September 21, 2017 17:14
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.

5 participants