Hello community, here is the log from the commit of package lentil for openSUSE:Factory checked in at 2017-05-06 18:29:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lentil (Old) and /work/SRC/openSUSE:Factory/.lentil.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "lentil" Sat May 6 18:29:16 2017 rev:2 rq:491533 version:1.0.9.0 Changes: -------- --- /work/SRC/openSUSE:Factory/lentil/lentil.changes 2017-04-12 18:12:49.734696228 +0200 +++ /work/SRC/openSUSE:Factory/.lentil.new/lentil.changes 2017-05-06 18:29:16.834367321 +0200 @@ -1,0 +2,5 @@ +Sun Apr 9 18:08:06 UTC 2017 - psimons@suse.com + +- Update to version 1.0.9.0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- lentil-1.0.8.0.tar.gz New: ---- lentil-1.0.9.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lentil.spec ++++++ --- /var/tmp/diff_new_pack.uAD1IB/_old 2017-05-06 18:29:17.366292264 +0200 +++ /var/tmp/diff_new_pack.uAD1IB/_new 2017-05-06 18:29:17.366292264 +0200 @@ -18,7 +18,7 @@ %bcond_with tests Name: lentil -Version: 1.0.8.0 +Version: 1.0.9.0 Release: 0 Summary: Frugal issue tracker License: GPL-3.0+ ++++++ lentil-1.0.8.0.tar.gz -> lentil-1.0.9.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/changes.txt new/lentil-1.0.9.0/changes.txt --- old/lentil-1.0.8.0/changes.txt 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/changes.txt 2017-04-04 09:45:59.000000000 +0200 @@ -1,3 +1,11 @@ +1.0.9.0 +------- + +- Released Tue 04 Apr 2017 08:53:46 CEST +- Added support for rst/sphinx directives (patch by Ben Franksen) +- Added support for .scala files (request by Utku Demir) +- Added developer mode (on: -Werror -Wall) + 1.0.8.0 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/contributors.txt new/lentil-1.0.9.0/contributors.txt --- old/lentil-1.0.8.0/contributors.txt 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/contributors.txt 2017-04-04 09:45:59.000000000 +0200 @@ -2,6 +2,7 @@ Michał Antkiewi Francesco Ariis +Ben Franksen Artyom Kazak Anton Felix Lorenzen Rodney Lorrimar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/doc/usr/page.rst new/lentil-1.0.9.0/doc/usr/page.rst --- old/lentil-1.0.8.0/doc/usr/page.rst 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/doc/usr/page.rst 2017-04-04 09:45:59.000000000 +0200 @@ -183,9 +183,11 @@ - Erlang source files (``.erl``, ``.hrl``, ``.escript``) including YECC (``.yrl``) and LEEX (``.xrl``) - OCaml source files (``.ml``, ``.mli``) +- Scala source files (``.scala``) - Rust source files (``.rs``, ``.rlib``) - Standard ML source files (``.sml``) - OpenGL Shading Language source files (``.glsl``) +- Restructured Text (Sphinx) ``.. ::todo`` directives (``.rst``) - plain text files (``.txt``) If you want a file type ``.xyz`` to be recognised as one in the list above, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/issues.txt new/lentil-1.0.9.0/issues.txt --- old/lentil-1.0.8.0/issues.txt 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/issues.txt 2017-04-04 09:45:59.000000000 +0200 @@ -27,11 +27,11 @@ 32 add .lentilignore (or even .lentilconf) Michał Antkiewicz [feature:intermediate] [request] 34 - https://blog.steve.org.uk/If_line_noise_is_a_program__all_fuzzers_are_develo... - in lentil? [debug] [u:2] - -lentil.cabal - 17 o data-files [easy] [fix] [2017] + https://blog.steve.org.uk/If_line_noise_is_a_program__all_fuzzers_are_develo... + in lentil? [debug] [u:2] + 35 add diff syntax (Sean Russel) [feature] [2017] [design] + 36 allow input from stdin (Sean Russel -- see diff syntax) [feature] + [2017] [design] src/Lentil/Args.hs 26 disambiguation optparse-applicative [feature:intermediate] @@ -52,10 +52,17 @@ 96 sicuramente c'è un modo più elegante e breve. Ah! quando mettono le tuples section! [refactor] [duct] +src/Lentil/Parse/Source.hs + 173 modText is extremely ducttape [duct] + 189 probabilmente getPosition non dovrebbe essere usato che solo per + gli errori [duct] + src/Lentil/Parse/Syntaxes.hs 25 qptain_nemo fake multiline comments in C (i.e. // and \ at the bottom of the line, continued into next line, are valid C comments but not recognised by lentil [u:1] [request] + 99 rst parser doesn't respect whitespace or paragraphs. How to + implement this without breaking other parsers? [bug] [design] test/Lentil/FileSpec.hs 38 excluding files fails on MS Windows! Check why! [u:3] [bug] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/lentil.cabal new/lentil-1.0.9.0/lentil.cabal --- old/lentil-1.0.8.0/lentil.cabal 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/lentil.cabal 2017-04-04 09:45:59.000000000 +0200 @@ -1,5 +1,5 @@ name: lentil -version: 1.0.8.0 +version: 1.0.9.0 synopsis: frugal issue tracker description: minumum effort, cohesive issue tracker based on ubiquitous @TODO@s and @FIXME@s conventions. @@ -30,6 +30,7 @@ test/test-files/lang-comm/ocaml.ml, test/test-files/lang-comm/rust.rs, test/test-files/lang-comm/standard-ml.sml, + test/test-files/lang-comm/rst.rst, test/test-files/lang-comm/text.txt, test/test-files/specific/contiguous.c, test/test-files/specific/cont-custom.c, @@ -48,6 +49,10 @@ issues.txt, contributors.txt cabal-version: >=1.24 +flag developer + description: developer mode - warnings let compilation fail + manual: True + default: False executable lentil main-is: Main.hs @@ -66,10 +71,17 @@ Lentil.Parse.Run, Lentil.Helpers hs-source-dirs: src default-language: Haskell2010 + if flag(developer) + GHC-Options: -Wall -Werror + else + GHC-Options: -Wall test-suite test default-language: Haskell2010 - ghc-options: -Wall + if flag(developer) + ghc-options: -Wall -Werror + else + ghc-options: -Wall HS-Source-Dirs: test, src main-is: Tests.hs build-depends: base==4.*, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/src/Lentil/File.hs new/lentil-1.0.9.0/src/Lentil/File.hs --- old/lentil-1.0.8.0/src/Lentil/File.hs 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/src/Lentil/File.hs 2017-04-04 09:45:59.000000000 +0200 @@ -78,8 +78,6 @@ extCheck = (fmap getAny . mconcat) (map (fmap Any . (extension ==?)) (extensionList as)) - - -- recursion predicate: excludes dot ('.') or _ folders recPred :: RecursionPredicate recPred = (not . isDotFolder) <$> fileName diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/src/Lentil/Parse/Issue.hs new/lentil-1.0.9.0/src/Lentil/Parse/Issue.hs --- old/lentil-1.0.8.0/src/Lentil/Parse/Issue.hs 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/src/Lentil/Parse/Issue.hs 2017-04-04 09:45:59.000000000 +0200 @@ -56,7 +56,6 @@ -- a blank line of text (even at eof) blankline :: ParIssue () blankline = char '\n' *> (() <$ char '\n' <|> eof) --- blankline = () <$ string "\n\n" ---------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/src/Lentil/Parse/Source.hs new/lentil-1.0.9.0/src/Lentil/Parse/Source.hs --- old/lentil-1.0.8.0/src/Lentil/Parse/Source.hs 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/src/Lentil/Parse/Source.hs 2017-04-04 09:45:59.000000000 +0200 @@ -30,12 +30,15 @@ -- from source to comment strings type ParSource a = Parsec String () a -data ParSyntax = ParSyntax { psLineComms :: [String], +data ParSyntax = -- 'standard' language (with single line and/or multiline + -- markers, etc. + StdSyntax { psLineComms :: [String], psBlockComms :: [(String, String)], psStringStyle :: EscapeStyle, psStringLits :: [Char], psCharStyle :: CharStyle, psCharLits :: [Char] } + | RstSyntax -- reStructuredText/sphinx parsing deriving (Show) data EscapeStyle = ClangLike | SQLLike @@ -142,19 +145,68 @@ (psCharLits ps)) +----------------------- +-- RST+SPHINX SYNTAX -- +----------------------- + +rstDocumentPart :: ParSource (Maybe CommentString) +rstDocumentPart = choice . map try $ [Just <$> rstTodo, Nothing <$ rstOther] + +-- `.. todo::` directive +rstTodo :: ParSource CommentString +rstTodo = MultiLine <$> getRow <*> + (rstTodoIncipit *> fmap modText todoBody) + <?> "rst todo directive" + where + startPara :: ParSource () + startPara = newline *> (() <$ satisfy (not . C.isSpace) <|> eof) + + todoBody :: ParSource String + todoBody = manyTill1 anyChar (lookAhead . try $ startPara <|> eof) + + -- modText does 2 things + -- 1. injects a dummy todo keyword, having discarded `.. todo::` + -- 2. replaces '\n' with "\n ", so that issue is not broken + -- by newline + modText :: String -> String + modText cs = "TODO " ++ addSpace cs + -- todo modText is extremely ducttape [duct] + + addSpace :: String -> String + addSpace [] = [] + addSpace ('\n':cs) = '\n' : ' ' : addSpace cs + addSpace (c:cs) = c : addSpace cs + +-- everything else +rstOther :: ParSource String +rstOther = manyTill1 anyChar (endp <|> eof) + <?> "rst other text" + where + endp = lookAhead . try $ rstTodoIncipit + +rstTodoIncipit :: ParSource () +rstTodoIncipit = fmap sourceColumn getPosition >>= \c -> + -- todo probabilmente getPosition non dovrebbe essere usato + -- che solo per gli errori [duct] + if c == 1 + then () <$ string ".. todo::" + else parserFail "rst todo incipit: not at begin-of-line" + + ------------ -- SOURCE -- ------------ -- given a set of lineparsers / blockparsers sourcePart :: ParSyntax -> ParSource (Maybe CommentString) -sourcePart ps@(ParSyntax lc bc es sl cs cl) = +sourcePart RstSyntax = rstDocumentPart +sourcePart ps@(StdSyntax lc bc es sl cs cl) = choice [plc, pbc, psl, pcl, ppr] > "source file part" where ct = choice . map try - plc = Just <$> (ct . map lineComment $ lc) -- line comlm + plc = Just <$> (ct . map lineComment $ lc) -- line comm pbc = Just <$> (ct . map blockComment $ bc) -- block comm psl = Nothing <$ (choice . map (try . litString es) $ sl) -- str lit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/src/Lentil/Parse/Syntaxes.hs new/lentil-1.0.9.0/src/Lentil/Parse/Syntaxes.hs --- old/lentil-1.0.8.0/src/Lentil/Parse/Syntaxes.hs 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/src/Lentil/Parse/Syntaxes.hs 2017-04-04 09:45:59.000000000 +0200 @@ -45,6 +45,7 @@ ([".elm"], Just haskell), -- Elm ([".c", ".h"], Just c), ([".cpp", ".hpp"], Just c), -- C++ + ([".scala"], Just c), -- Scala ([".java"], Just c), -- Java ([".glsl"], Just c), -- GL Shader ([".xrl"], Just c), -- FLEX @@ -63,36 +64,41 @@ ([".ml", ".mli"], Just ocaml), ([".rs", ".rlib"], Just rust), ([".sml"], Just sml), + ([".rst"], Just rst), -- reStructuredText ([".txt"], Just text) ] haskell, c, javascript, pascal, python, ruby, perl, nix, - xml, erlang, ocaml, rust, sml, text :: ParSource [CommentString] -haskell = source $ ParSyntax ["--"] [("{-", "-}")] + xml, erlang, ocaml, rust, sml, rst, text :: ParSource [CommentString] +haskell = source $ StdSyntax ["--"] [("{-", "-}")] ClangLike ['"'] CommonChr ['\''] -c = source $ ParSyntax ["//"] [("/*", "*/")] +c = source $ StdSyntax ["//"] [("/*", "*/")] ClangLike ['"'] CommonChr ['\''] -javascript = source $ ParSyntax ["//"] [("/*", "*/")] +javascript = source $ StdSyntax ["//"] [("/*", "*/")] ClangLike ['"', '\''] CommonChr [] -pascal = source $ ParSyntax ["//"] [("{", "}" ), ("(*", "*)")] +pascal = source $ StdSyntax ["//"] [("{", "}" ), ("(*", "*)")] SQLLike ['\''] CommonChr [] -python = source $ ParSyntax ["#"] [("\"\"\"", "\"\"\"")] +python = source $ StdSyntax ["#"] [("\"\"\"", "\"\"\"")] ClangLike ['"', '\''] CommonChr [] -ruby = source $ ParSyntax ["#"] [("=begin", "=end")] +ruby = source $ StdSyntax ["#"] [("=begin", "=end")] ClangLike ['"', '\''] CommonChr [] -perl = source $ ParSyntax ["#"] [] +perl = source $ StdSyntax ["#"] [] ClangLike ['"', '\''] CommonChr [] -nix = source $ ParSyntax ["#"] [("/*", "*/")] +nix = source $ StdSyntax ["#"] [("/*", "*/")] ClangLike ['"'] CommonChr ['\''] -xml = source $ ParSyntax [] [("<!--", "-->")] +xml = source $ StdSyntax [] [("<!--", "-->")] ClangLike ['"', '\''] CommonChr [] -erlang = source $ ParSyntax ["%"] [] +erlang = source $ StdSyntax ["%"] [] ClangLike ['"'] ErlangChr ['$'] -ocaml = source $ ParSyntax [] [("(*", "*)")] +ocaml = source $ StdSyntax [] [("(*", "*)")] ClangLike ['"', '\''] CommonChr [] -rust = source $ ParSyntax ["//!", "///", "//"] [] +rust = source $ StdSyntax ["//!", "///", "//"] [] ClangLike ['"', '\''] CommonChr [] -sml = source $ ParSyntax [] [("(*", "*)")] +sml = source $ StdSyntax [] [("(*", "*)")] ClangLike ['"'] CommonChr [] +rst = source RstSyntax + -- todo [bug] [design] rst parser doesn't respect whitespace or + -- paragraphs. How to implement this without breaking other + -- parsers? text = (:[]) . MultiLine 1 <$> many anyChar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/src/Main.hs new/lentil-1.0.9.0/src/Main.hs --- old/lentil-1.0.8.0/src/Main.hs 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/src/Main.hs 2017-04-04 09:45:59.000000000 +0200 @@ -7,7 +7,6 @@ import Options.Applicative -import qualified Data.Maybe as M import Data.Monoid -- 7.8 import qualified System.IO as I @@ -25,11 +24,12 @@ short 'h', help "Show this help text" ] +version :: Parser (a -> a) version = infoOption versionCopy ( long "version" <> short 'v' <> help "show version and copyright info" ) where - versionCopy = "\nlentil - frugal issue tracker, version 1.0.8.0\n\ + versionCopy = "\nlentil - frugal issue tracker, version 1.0.9.0\n\ \(C) 2015-2017 Francesco Ariis - http://www.ariis.it\n\ \released under the GNU General Public License v3\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/stack.yaml new/lentil-1.0.9.0/stack.yaml --- old/lentil-1.0.8.0/stack.yaml 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/stack.yaml 2017-04-04 09:45:59.000000000 +0200 @@ -1,3 +1,3 @@ -resolver: nightly-2016-12-29 +resolver: lts-8.3 packages: - '.' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/test/Lentil/Parse/RunSpec.hs new/lentil-1.0.9.0/test/Lentil/Parse/RunSpec.hs --- old/lentil-1.0.8.0/test/Lentil/Parse/RunSpec.hs 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/test/Lentil/Parse/RunSpec.hs 2017-04-04 09:45:59.000000000 +0200 @@ -104,4 +104,9 @@ it "parses a Standard ML source" $ fileParser [] [] "test/test-files/lang-comm/standard-ml.sml" `shouldReturn` spt "test/test-files/lang-comm/standard-ml.sml" + it "parses an rst+sphinx document" $ + fileParser [] [] "test/test-files/lang-comm/rst.rst" + `shouldReturn` [Issue "test/test-files/lang-comm/rst.rst" 3 + (Just "some text, more text another paragraph, \ + \still belongs to todo") [Tag "hh2"]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/test/Lentil/Parse/SourceSpec.hs new/lentil-1.0.9.0/test/Lentil/Parse/SourceSpec.hs --- old/lentil-1.0.8.0/test/Lentil/Parse/SourceSpec.hs 2017-01-24 16:27:39.000000000 +0100 +++ new/lentil-1.0.9.0/test/Lentil/Parse/SourceSpec.hs 2017-04-04 09:45:59.000000000 +0200 @@ -1,7 +1,7 @@ module Lentil.Parse.SourceSpec where import Test.Hspec -import Text.Parsec (runParser) +import Text.Parsec (runParser, many, anyChar) import Lentil.Types import Lentil.Parse.Source @@ -62,7 +62,7 @@ it "parses an erlang-style char" $ sp (litChar ErlangChr '$') "$%" `shouldBe` Just '%' - let hss = ParSyntax ["--"] [("{-", "-}")] + let hss = StdSyntax ["--"] [("{-", "-}")] ClangLike ['"'] CommonChr ['\''] describe "program" $ do it "parses program instructions till eof" $ @@ -78,7 +78,28 @@ it "stops at ' which is not a literal char" $ sp (program hss) "prova' " `shouldBe` Just "prova' " - let rbs = ParSyntax ["#"] [] ClangLike ['"', '\''] CommonChr [] + describe "rstTodo" $ do + it "parses a reStructuredText+sphinx todo directive" $ + sp rstTodo ".. todo:: prova\n\n foo" `shouldBe` + Just (ml 1 "TODO prova\n \n foo") + it "fails if directive is not at the beginning of line" $ + sp rstTodo " .. todo:: prova\n\n foo" `shouldBe` Nothing + + describe "rstOther" $ do + it "parses a reStructuredText+sphinx other-than-todo directive part" $ + sp rstOther "gianni \n.. todo:: prova\n\n foo" `shouldBe` + Just "gianni \n" + + describe "rstDocmuentPart" $ do + it "parses a reStructuredText+sphinx document part: todo" $ + sp rstDocumentPart ".. todo:: prova\n\n foo" `shouldBe` + Just (Just $ ml 1 "TODO prova\n \n foo") + it "parses a reStructuredText+sphinx document part: non-todo" $ + sp (rstDocumentPart *> many anyChar) + "gianni \n.. todo:: prova\n\n foo" `shouldBe` + Just ".. todo:: prova\n\n foo" + + let rbs = StdSyntax ["#"] [] ClangLike ['"', '\''] CommonChr [] describe "source" $ do it "parses one piece of source (line-comment)" $ sp (source hss) "-- hey\n my " `shouldBe` Just [sl 1 " hey"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lentil-1.0.8.0/test/test-files/lang-comm/rst.rst new/lentil-1.0.9.0/test/test-files/lang-comm/rst.rst --- old/lentil-1.0.8.0/test/test-files/lang-comm/rst.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/lentil-1.0.9.0/test/test-files/lang-comm/rst.rst 2017-04-04 09:45:59.000000000 +0200 @@ -0,0 +1,8 @@ +The girl in purple shirts where urged not to disturb sir Cuthbert. + +.. todo:: [hh2] some text, + more text + + another paragraph, still belongs to todo + +This format was provided by Ben Franksen.