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

WIP ShellCheck: update to 0.6.0 #4577

Closed
wants to merge 26 commits into from
Closed

Conversation

sirn
Copy link
Contributor

@sirn sirn commented Jun 11, 2019

Description

This PR update ShellCheck to 0.6.0 and upgrade/introduce a new port of all dependencies required to get it running. ShellCheck has since switched from hs-json to hs-aeson, and even though ShellCheck dependencies says any version of aeson is fine, it actually requires a newer version of aeson (thus existing hs-aeson does not work).

So instead of updating hs-aeson, which may break other packages in process, I decided to create hs-aeson-devel and add new port for its dependencies, using -devel suffix in its name (if the package already exists). Some -devel package can be link against the existing hs-hashable in MacPorts, but hs-aeson-devel require hashable >=1.2.7.0, so I have to link its dependencies with hs-hashable-devel because otherwise hs-aeson will fail to build (due to deriving error with Hashable Text).

I tried to keep the dependencies tree clean by following few rules:

  • Any dependencies of hs-aeson-devel are linked against hs-hashable-devel
  • Any -devel packages are linked against -devel packages instead of haskell-platform
  • Any non--devel packages are linked against packages in haskell-platforms if possible

Please consider this PR as a WIP, as I believe it require a lot more work to be done before it can be merged, but I need feedback from existing maintainers, so I'm sorry for opening a WIP PR.

Thanks!

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.15 19A471t
Xcode 11.0 11M336w

Verification

Have you

I used sudo port -vs install to install because I cannot enable tracing on GHC possibly because I'm running a beta software (sorry about this); the process simply hangs and require kill -9 to exit.

@macportsbot
Copy link

Notifying maintainers:
@neverpanic for port hs-dlist, hs-tagged, shellcheck.

@macportsbot
Copy link

Travis Build #6832 Canceled.

Lint results
--->  Verifying Portfile for hs-aeson-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-attoparsec-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-base-compat
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-contravariant
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-dlist
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-fail
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-generic-deriving
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-hashable-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-integer-logarithms
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-mtl-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-nats-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-primitive-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-scientific-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-semigroups-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-statevar
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-tagged
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-text-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-th-abstraction
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-time-locale-compat
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-transformers-compat
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-transformers-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-unordered-containers-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-uuid-types
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-vector-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-void-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for shellcheck
--->  0 errors and 0 warnings found.

Port hs-aeson-devel's dependencies fail on xcode10.2. Log
Port hs-attoparsec-devel's dependencies fail on xcode10.2. Log
Port hs-base-compat success on xcode10.2. Log
Port hs-contravariant's dependencies fail on xcode10.2. Log
Port hs-dlist success on xcode10.2. Log
Port hs-fail success on xcode10.2. Log
Port hs-generic-deriving success on xcode10.2. Log
Port hs-hashable-devel success on xcode10.2. Log
Port hs-integer-logarithms success on xcode10.2. Log
Port hs-mtl-devel success on xcode10.2. Log
Port hs-nats-devel success on xcode10.2. Log
Port hs-primitive-devel success on xcode10.2. Log
Port hs-scientific-devel success on xcode10.2. Log
Port hs-semigroups-devel's dependencies fail on xcode10.2. Log
Port hs-statevar success on xcode10.2. Log
Port hs-tagged's dependencies fail on xcode10.2. Log
Port hs-text-devel success on xcode10.2. Log
Port hs-th-abstraction success on xcode10.2. Log
Port hs-aeson-devel's dependencies fail on xcode9.4. Log
Port hs-attoparsec-devel's dependencies fail on xcode9.4. Log
Port hs-base-compat success on xcode9.4. Log
Port hs-contravariant's dependencies fail on xcode9.4. Log
Port hs-dlist success on xcode9.4. Log
Port hs-fail success on xcode9.4. Log
Port hs-generic-deriving success on xcode9.4. Log
Port hs-hashable-devel success on xcode9.4. Log
Port hs-integer-logarithms success on xcode9.4. Log
Port hs-mtl-devel success on xcode9.4. Log
Port hs-nats-devel success on xcode9.4. Log
Port hs-primitive-devel success on xcode9.4. Log
Port hs-scientific-devel success on xcode9.4. Log

The build timed out.

@sirn sirn force-pushed the shellcheck-upgrade branch from 3586469 to 532b788 Compare June 11, 2019 12:38
@macportsbot
Copy link

Travis Build #6839 Errored.

Lint results
--->  Verifying Portfile for hs-aeson-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-attoparsec-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-base-compat
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-contravariant
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-dlist
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-fail
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-generic-deriving
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-hashable-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-integer-logarithms
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-mtl-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-nats-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-primitive-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-scientific-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-semigroups-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-statevar
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-tagged
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-text-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-th-abstraction
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-time-locale-compat
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-transformers-compat
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-transformers-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-unordered-containers-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-uuid-types
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-vector-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for hs-void-devel
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for shellcheck
--->  0 errors and 0 warnings found.

The build timed out.

@cjones051073 cjones051073 changed the title ShellCheck: update to 0.6.0 (WIP) WIP ShellCheck: update to 0.6.0 Jun 12, 2019
@cjones051073 cjones051073 added the wip Work in progress label Jun 12, 2019
@pmetzger
Copy link
Member

@cjones051073 Are you shepherding this?

@sirn
Copy link
Contributor Author

sirn commented Jun 24, 2019

Heads-up, my Mac is currently dead so I can’t work on this for a week, but please do leave comment! Thanks!

@neverpanic
Copy link
Member

Sorry for not seeing this any earlier – there is currently some work going on to get Haskell modernized based on stack, see #4794, #5049, #4633 and as an example port update, #4698.

We may eventually go down the stack-based route, since it's just much easier to package the binaries we want without worrying about all the different library dependencies.

Cc: @essandess.

@sirn
Copy link
Contributor Author

sirn commented Aug 20, 2019

Makes sense, I actually prefer stack-based installations than manually managing dependencies (of which I have no idea what to do with the -devel packages once MacPorts updated GHC :-) I may find some time to port ShellCheck to stack-based build once the relevant PRs are merged.

@essandess
Copy link
Contributor

I may find some time to port ShellCheck to stack-based build once the relevant PRs are merged.

@sirn It’s pretty fast and simple. Here are a couple examples:

@essandess
Copy link
Contributor

@sirn BTW, it would be helpful if you looked at those Portfile examples with a critical eye. Specifically, I haven’t fully checked if those .env settings are actually used or necessary (MacPorts tcl is opaque in this way). And I haven’t tried to get a working build with MacPorts gcc. Though that should work, running it out-of-the-box breaks stack builds, so I explicitly set the macOS native gcc.

Please post any corrections you feel are necessary, or a way to use MacPorts compilers if you get a chance to figure that one out.

@sirn
Copy link
Contributor Author

sirn commented Aug 21, 2019

@essandess I'll take a look and will try to port this to stack-based Portfile during the weekend. Thanks!

@essandess
Copy link
Contributor

@sirn Also, take a critical look at the binary that stack produces. stack doesn’t really do DESTDIR or PREFIX. Often it works anyway. If not, some hackiness will be required.

@neverpanic
Copy link
Member

Right, I should have checked before, but shellcheck was just updated to 0.7.0 in #5142.

@neverpanic neverpanic closed this Aug 27, 2019
@sirn sirn deleted the shellcheck-upgrade branch December 2, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

6 participants