GithubHelp home page GithubHelp logo

flycheck-hdevtools's Introduction

Flycheck

License GPL 3 Join the chat MELPA MELPA stable version NonGNU ELPA CI Docs Lint Python

https://www.flycheck.org

Modern on-the-fly syntax checking extension for GNU Emacs. Try it!

Getting Started

Flycheck is available for installation with package.el on NonGNU ELPA, MELPA Stable and MELPA.

You can install Flycheck with the following command:

M-x package-install [RET] flycheck [RET]

Finally add this to your Emacs config:

(global-flycheck-mode +1)

Alternatively, if you're into use-package you can do the following:

(use-package flycheck
  :ensure t
  :config
  (add-hook 'after-init-hook #'global-flycheck-mode))

Now you can start using any of the bundled checkers or install additional checkers.

For a more gentle introduction read the Installation instructions and go through Quickstart guide.

Getting Help

Please ask questions about Flycheck on Stack Exchange or in our Gitter chat, and report bugs to our issue tracker.

Contributing

We welcome all kinds of contributions, whether you write patches, open pull requests, write documentation, help others with Flycheck issues, or just tell other people about your experiences with Flycheck. Please take a look at our Contributor’s Guide for help and guidance about contributing to Flycheck.

Sponsoring

You can support financially the development of Flycheck and related packages via:

Open Collective Backers

Open Collective Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Code of Conduct

We strive to create a safe, friendly and welcoming environment in the Flycheck community and have a Code of Conduct that defines acceptable and welcome behaviour as well as sanctions for violations. All contributors and all participants are expected to follow it, on Github, Gitter, Emacs.SX or any other place that’s part of Flycheck’s broader community.

License

Flycheck is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Flycheck is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

flycheck-hdevtools's People

Contributors

ch1bo avatar fizbin avatar gridaphobe avatar jeremyjh avatar purcell avatar swsnr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

flycheck-hdevtools's Issues

non-zero exit code 1, but no errors from output

Hello,

I am getting this error:

Checker haskell-hdevtools returned non-zero exit code 1, but no errors from output: Glyph.hs:44:18:
    Could not find module `Graphics.Rendering.FreeType.Internal.GlyphMetrics'
    Use -v to see a list of the files searched for.

Checker definition probably flawed.

Package is in cabal sandbox. I've used

$ cabal sandbox delete
$ cabal sandbox init
$ cabal install --only-dependencies
$ cabal configure && cabal build

Program compiles and works fine.

flycheck-version: 0.18alpha (package: 20140210.1331)

$ emacs --version
GNU Emacs 24.3.1
...
$ cabal --version
cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library 
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3

Output of C-c ! C-c:

-*- mode: compilation; default-directory: "~/code/haskell/bdf/" -*-
Compilation started at Tue Feb 11 16:50:38

hdevtools check -g -Wall /home/$USER/code/haskell/bdf/RepaImg.hs
Glyph.hs:44:18:
    Could not find module `Graphics.Rendering.FreeType.Internal.GlyphMetrics'
    Use -v to see a list of the files searched for.

Compilation exited abnormally with code 1 at Tue Feb 11 16:50:38

If I open Glyph.hs file, flycheck highlights error on line 44 (the one with qualified keyword) which is same as the output from C-c ! C-c:

...
import Graphics.Rendering.FreeType.Internal.GlyphMetrics (FT_Glyph_Metrics)
import qualified Graphics.Rendering.FreeType.Internal.GlyphMetrics as GlyphMetrics
...

In other files of my project I am getting the non-zero exit code 1 listed above.

Full contents of *Messages* buffer:

Loading /usr/share/emacs/site-lisp/site-start.d/desktop-entry-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/git-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/golang-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/haskell-mode-init.el (source)...
Loading haskell-site-file...done
Loading /usr/share/emacs/site-lisp/site-start.d/haskell-mode-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/rpmdev-init.el (source)...done
Loading /usr/share/emacs/site-lisp/site-start.d/systemtap-init.el (source)...done
OVERVIEW
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Initializing...done
Loading names...done
Checker haskell-hdevtools returned non-zero exit code 1, but no errors from output: Glyph.hs:44:18:
    Could not find module `Graphics.Rendering.FreeType.Internal.GlyphMetrics'
    Use -v to see a list of the files searched for.

Checker definition probably flawed.
Checker haskell-hdevtools returned non-zero exit code 1, but no errors from output: Glyph.hs:44:18:
    Could not find module `Graphics.Rendering.FreeType.Internal.GlyphMetrics'
    Use -v to see a list of the files searched for.

Checker definition probably flawed.
Compilation exited abnormally with code 1
Mark set
Quit
byte-code: Beginning of buffer [4 times]
Auto-saving...
Checker haskell-hdevtools returned non-zero exit code 1, but no errors from output: Glyph.hs:44:18:
    Could not find module `Graphics.Rendering.FreeType.Internal.GlyphMetrics'
    Use -v to see a list of the files searched for.

Checker definition probably flawed.
Auto-saving...
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help

hdevtools should use source-inplace, not source

Hdevtools - which is in fact still being developed and worked on, as flaky as it may seem to be lately, has built-in support for finding cabal sandboxes, and using them.

Unfortunately, this support assumes that it will be given the actual path to the file (or enough of the path as is needed to crawl back up the tree to find the cabal sandbox).

This used to happen automatically, with source-inplace. However, for reasons I don't understand, source-inplace was replaced with source in mid-2014. This breaks the ability of hdevtools to find the local cabal sandbox, and makes it significantly less useful on actual haskell projects.

xmonad lib subdirectory

Hello,

I need some advice on what would be the recommend way of dealing with the issue.

When editing xmonad.hs using flycheck-hdevtools, flycheck does not search the lib/ subdirectory for modules and throws the below error:

69 18 error Could not find module `XMonad.Util.DTrace'
Perhaps you meant
XMonad.Util.Image (from xmonad-contrib-0.12)
XMonad.Util.Replace (from xmonad-contrib-0.12)
XMonad.Util.Stack (from xmonad-contrib-0.12)
Use -v to see a list of the files searched for. (haskell-hdevtools)

Below is the relevant recompile command in xmonad:

-- | 'recompile force', recompile @~/.xmonad/xmonad.hs@ when any of the
...
...
recompile :: MonadIO m => Bool -> m Bool
recompile force = io $ do
dir <- getXMonadDir
let binn = "xmonad-"++arch++"-"++os
bin = dir </> binn
base = dir </> "xmonad"
err = base ++ ".errors"
src = base ++ ".hs"
lib = dir </> "lib"
libTs <- mapM getModTime . Prelude.filter isSource =<< allFiles lib
srcT <- getModTime src
binT <- getModTime bin
if force || any (binT <) (srcT : libTs)
then do
-- temporarily disable SIGCHLD ignoring:
uninstallSignalHandlers
status <- bracket (openFile err WriteMode) hClose $ \h ->
waitForProcess =<< runProcess "ghc" ["--make", "xmonad.hs", "-i", "-ilib", "-fforce-recomp", "-main-is", "main", "-v0", "-o",binn](Just dir)
Nothing Nothing Nothing (Just h)

----- relevant hdevtools commands
hdevtools check -g -Wall xmonad.hs
xmonad.hs:69:18:
Could not find module `XMonad.Util.DTrace'
Perhaps you meant
XMonad.Util.Image (from xmonad-contrib-0.12)
XMonad.Util.Replace (from xmonad-contrib-0.12)
XMonad.Util.Stack (from xmonad-contrib-0.12)
Use -v to see a list of the files searched for.


hdevtools check -g -Wall -g -ilib xmonad.hs
xmonad.hs:230:1: Warning:
Top-level binding with no type signature:
myLayoutHook :: .....

Any thoughts, please?

I need to add a parameter to hdevtools. Not sure if it is a good idea to have it as a flycheck-hdevtools variable?

Thanks
Joe

hdevtools could not find module under the same directory

Not sure if this is a bug or I've done something wrong, but please help me troubleshoot this problem.

What I did is:

  • create a new directory (e.g. /tmp/mod)
  • create the following two files:

Mod.hs:

module Mod where

a = 1

Main.hs:

import Mod

main = print a

When editing Main.hs, an error is found on line 1 col 8 saying "Could not find module Mod"

I used C-c ! l to bring up the error list and found that error message comes from haskell-hdevtools

Related info

  • flycheck-haskell 20141003.308
  • hdevtools 0.1.0.6
  • flycheck-haskell-hdevtools-executable customized

Original thread

Respect cabal sandbox

I recently started working with Cabal sandboxes (as in cabal sandbox init). However, flycheck-hdevtools does not find the packages installed in the sandbox, which frequently leads to "package not found" errors.
I then have to install the packages outside the sandbox, which (at the moment) still works, but somewhat negates the advantages of having a sandbox.

broken

Got errors like:

Suspicious state from syntax checker haskell-hdevtools: Flycheck checker haskell-hdevtools returned non-zero exit code 1, but its output contained no errors: Cabal error: Encountered missing dependencies:
    hspec-wai -any, hspec-wai-json -any

Try installing a more recent version of haskell-hdevtools, and please open a bug report if the issue persists in the latest release.  Thanks!

Hdevtools installed by stack install hdevtools

Flycheck-hdevtools installed by el-get:

$ git -C ~/.emacs.d/el-get/flycheck-hdevtools/ status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	flycheck-hdevtools.elc

nothing added to commit but untracked files present (use "git add" to track)
$ git -C ~/.emacs.d/el-get/flycheck-hdevtools/ log -1
commit eab1fc184854341a56154623a131cab6ff0ce18c (HEAD -> master, origin/master, origin/HEAD)
Author: Steve Purcell <[email protected]>
Date:   Sun Nov 13 13:46:21 2016 +1300

    Note that this library is currently unmaintained

    See #5

Emacs GNU Emacs 25.2.1 (x86_64-apple-darwin16.4.0, NS appkit-1504.81 Version 10.12.3 (Build 16D30)) of 2017-06-22,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.