Skip to content

Pass directory path from call-site - #59858

Merged
jkoritzinsky merged 1 commit into
dotnet:mainfrom
am11:feature/configurations
Oct 1, 2021
Merged

Pass directory path from call-site#59858
jkoritzinsky merged 1 commit into
dotnet:mainfrom
am11:feature/configurations

Conversation

@am11

@am11am11 commented Oct 1, 2021

Copy link
Copy Markdown
Member

When init-compiler is sourced (as opposed to eval'd), the script was giving a non-fatal error, e.g. on mono x64: pipeline-logging-functions.sh: No such file or directory. We use Azure logging functions in error cases, so it went unnoticed.

This PR uses the same simple mechanism for sourced scripts we have used in other places; pass the directory path from all call-sites as an argument. Also quoted the positional arguments.

@am11
am11 requested a review from marek-safar as a code ownerOctober 1, 2021 12:06
@ghostghost added the community-contribution Indicates that the PR has been added by a community member label Oct 1, 2021
@ghost

ghost commented Oct 1, 2021

Copy link
Copy Markdown

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@am11

am11 commented Oct 1, 2021

Copy link
Copy Markdown
MemberAuthor

cc @jkoritzinsky, @janvorli, noticed this when I was looking at mono logs for another issue: https://dev.azure.com/dnceng/public/_build/results?buildId=1397492&view=logs&j=38c63b74-c97f-5bda-376d-1084248ecb57&t=b7130259-7da2-5518-9023-82792e689970&l=98

In gen-buildsys.sh, it doesn't warn because we are at the same relative distance.

Comment threadeng/common/native/init-compiler.sh Outdated
@am11
am11force-pushed the feature/configurations branch from aa2dccb to a59ed9bCompareOctober 1, 2021 12:55
@am11

am11 commented Oct 1, 2021

Copy link
Copy Markdown
MemberAuthor

Before:

Running 'bash -c 'source /__w/1/s/eng/common/native/init-compiler.sh x64 clang && ....

/__w/1/s/eng/common/native/init-compiler.sh: line 16: /__w/1/s/artifacts/obj/mono/Linux.x64.Debug/../pipeline-logging-functions.sh: No such file or directory

(the build still continues and succeeds because it's not running with set -e)

After:

Running 'bash -c 'source /__w/1/s/eng/common/native/init-compiler.sh "/__w/1/s/eng/common/native" "x64" "clang" && ....

It regressed in #59018.

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thank you!

@am11

am11 commented Oct 1, 2021

Copy link
Copy Markdown
MemberAuthor

win x64 failure is unrelated to PR changes: #29683.

@jkoritzinsky
jkoritzinsky merged commit 0c7b609 into dotnet:mainOct 1, 2021
@am11
am11 deleted the feature/configurations branch October 1, 2021 16:37
@ghostghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@am11@janvorli@jkoritzinsky