This is an archive of the discontinued LLVM Phabricator instance.

Detect errors in Windows packaging script
ClosedPublic

Authored by pbo-linaro on Oct 4 2022, 3:41 AM.

Details

Summary
  • Detect VS devcmd error (missing VS)
  • Detect missing python install
  • Show commands executed
  • Removed pause (blocking CI usage)

Diff Detail

Event Timeline

pbo-linaro created this revision.Oct 4 2022, 3:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 3:41 AM
pbo-linaro requested review of this revision.Oct 4 2022, 3:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 3:41 AM
hans accepted this revision.Oct 4 2022, 4:04 AM

lgtm

llvm/utils/release/build_llvm_release.bat
69

I liked this, but I can see how it doesn't make sense for everyone.

This revision is now accepted and ready to land.Oct 4 2022, 4:04 AM
mstorsjo added inline comments.
llvm/utils/release/build_llvm_release.bat
128

Why this added @echo on here? Does call "%vsdevcmd%" affect the echo mode of this surrounding script?

pbo-linaro marked an inline comment as done.Oct 4 2022, 4:16 AM
pbo-linaro added inline comments.
llvm/utils/release/build_llvm_release.bat
69

I'm open to discuss this.
We are using a pre-script that downloads dependencies, and having this one to stop after some time, is not so handy.

128

Alas yes. Any script called with call "pollutes" current environment, including for echoing commands.
So, an @echo off will disable echo in parent script.
It's equivalent to a "source" in bash, which can be counter intuitive.

hans added inline comments.Oct 4 2022, 4:18 AM
llvm/utils/release/build_llvm_release.bat
69

I think dropping it is fine.

mstorsjo added inline comments.Oct 4 2022, 4:29 AM
llvm/utils/release/build_llvm_release.bat
69

FWIW, if there's an easy way to check if the current terminal is interactive or not (it's fairly easy to do this for unix shell scripts at least), it could be kept conditionally for such cases I think.

128

Ah, right - it's been a couple decades since I spent more time thinking about the intricacies of bat scripts... Then this sounds reasonable to me.

pbo-linaro marked 2 inline comments as done.Oct 4 2022, 4:37 AM
pbo-linaro added inline comments.
llvm/utils/release/build_llvm_release.bat
69

It probably exists for batch indeed. But when used really interactively (like use case I was talking about), the fact it stops is not handy.

@hans It seems build failed because of a sporadic issues (not related to this patch).

How are we suppose to deal with this? Do you have rights to trigger it again?
Once built, is it automatically rebase/merged on trunk, or do you do trigger this by clicking somewhere?

That's my first submission using phabricator, so sorry if the question is naive (didn't find answer in llvm documentation).

hans added a comment.Oct 4 2022, 5:25 AM

@hans It seems build failed because of a sporadic issues (not related to this patch).

How are we suppose to deal with this? Do you have rights to trigger it again?

Sadly it often fails for unrelated reasons. Ignoring it is fine, especially since it doesn't run this script at all.

Once built, is it automatically rebase/merged on trunk, or do you do trigger this by clicking somewhere?

There is no automatic way to commit/push. Since it's your first patch I assume you don't have commit access, so I will commit it on your behalf (see https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access).

@hans
Thanks, I thought is was "blocking", like some other review systems.
For commit access, I'll probably request it somewhere in the future (beyond work on this script).
Thanks for submitting it for me.

This revision was landed with ongoing or failed builds.Oct 4 2022, 6:23 AM
This revision was automatically updated to reflect the committed changes.