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

Pass directory path from call-site #59858

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

am11
Copy link
Member

@am11 am11 commented Oct 1, 2021

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 owner October 1, 2021 12:06
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 1, 2021
@dotnet-issue-labeler
Copy link

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
Copy link
Member Author

am11 commented Oct 1, 2021

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.

@am11
Copy link
Member Author

am11 commented Oct 1, 2021

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.

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@am11
Copy link
Member Author

am11 commented Oct 1, 2021

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

@jkoritzinsky jkoritzinsky merged commit 0c7b609 into dotnet:main Oct 1, 2021
@am11 am11 deleted the feature/configurations branch October 1, 2021 16:37
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community-contribution Indicates 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