Skip to content

Conversation

@redianthus
Copy link
Contributor

Hi,

See this comment.

@PhysSong
Copy link
Member

PhysSong commented Jun 26, 2017

Great! Travis CI build is now passing.

mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin"

if [ $? -ne 0 ]; then
if ! mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin"; then
Copy link
Member

@tresf tresf Jun 27, 2017

Choose a reason for hiding this comment

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

This is where shellcheck shows its value. If we need both DLLs, we'll need to test for both.

Copy link
Member

Choose a reason for hiding this comment

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

I agree. This problem also existed before, and we need to fix it if needed.

Copy link
Member

Choose a reason for hiding this comment

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

if ! ( mv "$mingw_root/lib/bin/libakai-0.dll" "$mingw_root/bin" && mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin" );then

@tresf Would it be better?

Copy link
Member

Choose a reason for hiding this comment

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

@PhysSong I'm not sure. I have some reservations about how the script is growing in general (could benefit from some utility functions). I guess it's OK. I'm curious what @zapashcanon comes up with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's something I don't understand. Why don't we (I) add set -e on the previous PR on this script ? That would allow us to remove almost all these tests...

Copy link
Member

Choose a reason for hiding this comment

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

@zapashcanon I think so.
If you add set -e, however, printing custom error message will be unable. Is there alternative method? Or, is it okay to disable printing custom error message?

Copy link
Member

Choose a reason for hiding this comment

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

Sure... we're moving toset -e for everything else. 👍. We've sort of repurposed a fetch/untar script as a build helper so this file is growing in complexity which can affect how it should respond to errors.

Ideally we'd just move away from this technique and leverage something crowdsourced like scoop instead, but we're not there yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved to set -e in a new commit. There's no need for custom error message IMO: we print a lot of info about what we're doing, so the user will know what failed, plus, the shell will print something too. What do you think ?

@PhysSong
Copy link
Member

PhysSong commented Jul 2, 2017

@tresf I suggest you to merge ASAP if there's no problem. Some people might think Travis CI is failing because of Critical bug(s). By merging this, We can prevent such misunderstandings.

@tresf
Copy link
Member

tresf commented Jul 2, 2017

The message to relaunch in mingw shell is there for a reasons since this can be unobvious to the user. Please bring it back as well as red error message.

@redianthus
Copy link
Contributor Author

as well as red error message

Are you just talking about the relauch in mingw shell or every error message ?

I think most of the error message are useless, e.g.:

info "Downloading and building fltk $fltkver"

 if ! which fluid; then
    wget http://fltk.org/pub/fltk/$fltkver/fltk-$fltkver-source.tar.gz -O "$HOME/fltk-source.tar.gz"

If wget fails, no need to do: err "ERROR: Could not download fltk. Exiting." IMO, we already told the user what we're doing, if it fails, it will be clear.

If you disagree, so, what you want is just my first commit right ? I can just remove the second commit... But I think we should keep it.

@tresf
Copy link
Member

tresf commented Jul 2, 2017

I think most of the error message are useless [...] If wget fails, no need to do: err ...

Agreed, just the mingw one, it's not obvious at all, but to that point we may have others that aren't obvious down the road. set -e is a convenience, but we have to keep in the ability to issue a human warning (or error) when stderr is inadequate. From my experience, stderr failing to tell the ACTUAL problem happens about 10% of the time.

@redianthus
Copy link
Contributor Author

we have to keep in the ability to issue a human warning (or error) when stderr is inadequate

We probably could do something with trap.

Agreed, just the mingw one

I'll fix it in the second commit then.

@PhysSong
Copy link
Member

PhysSong commented Jul 4, 2017

@zapashcanon @tresf Now it seems to be ready for merge. Is it needs any more changes?

@tresf
Copy link
Member

tresf commented Jul 4, 2017

Were the indents addressed? I understand there is a need for master to clear Travis-CI, but "ready for merge" is subjective.

if [ $? -ne 0 ]; then
err "ERROR: Could not build/install libgig -- gigplayer needs this. Exiting."
fi
mv "$mingw_root/lib/bin/libgig-7.dll" "$mingw_root/bin"
Copy link
Member

Choose a reason for hiding this comment

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

Needs indentation?


# SC2185 is disabled because of: https://github.com/koalaman/shellcheck/issues/942
# once it's fixed, it should be enabled again
# shellcheck disable=SC2185
Copy link
Member

Choose a reason for hiding this comment

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

Here three lines, too.

@redianthus
Copy link
Contributor Author

@tresf, I didn't noticed the indent, fixed now.

@tresf
Copy link
Member

tresf commented Jul 4, 2017

Thanks for the fixes! Merging. If we encounter new issues we'll submit them as new PRs/patches.

@tresf tresf merged commit 94420d9 into LMMS:master Jul 4, 2017
@tresf
Copy link
Member

tresf commented Jul 4, 2017

@zapashcanon the merge button gave credit to me do to the way the commits were added (my attempt to Jeep then separate). Apologies.

@zonkmachine
Copy link
Contributor

zonkmachine commented Jul 4, 2017

the merge button gave credit to me do to the way the commits were added

git commit --amend --author="Author Name <[email protected]>"

@zonkmachine
Copy link
Contributor

@tresf No. He's credited. This was in master and our default is stable-1.2 so once we switch to master these commits will be visible. If I'm even on topic here...

@tresf
Copy link
Member

tresf commented Jul 4, 2017

@redianthus
Copy link
Contributor Author

Merging.

Thanks.

If we encounter new issues we'll submit them as new PRs/patches.

I agree on this.

sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
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.

4 participants