Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Patch source, then pickup compile (James Toll)
   2. Re:  Patch source, then pickup compile (Nadir Sampaoli)
   3. Re:  Patch source, then pickup compile (James Toll)
   4. Re:  Patch source, then pickup compile (James Toll)


----------------------------------------------------------------------

Message: 1
Date: Sat, 20 Sep 2014 11:58:05 -0500
From: James Toll <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Patch source, then pickup compile
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

On Sep 20, 2014, at 2:43 AM, Vlatko Basic <[email protected]> wrote:
> Get (patched) package into a separate dir
> $ cabal sandbox add-source /my/patched/library # Add a new add-source 
> dependency
> $ cabal install --dependencies-only            # Install it into the sandbox
> $ cabal build                                  # Build the local package
> 
> This way cabal first searches in the add-source dir for any dependency, and 
> builds it from there. You can add several dirs with patched packages
> 
> You can/might have to add constraints in local cabal.config file (in 
> sandboxed dir) to force cabal to use the latest version of the package

Thanks to you, Nadir, and Benjamin for the follow-up emails explaining the 
proper way to handle this.  From your emails, it sounds like instead of using a 
shared sandbox, I should have added the Pandoc source using 'cabal sandbox 
add-source'.  What I?m wondering now is what are the implications of the way I 
managed to get it to work?  And whether I should go back and re-do it the way 
you?ve described.

I do have one concern though.  The part where you mention that if any of the 
source files are changed, then cabal will rebuild.  I don?t want or need that 
functionality given that this is supposed to be a temporary work around until 
the fixed version of Pandoc is in Hackage.

> If a file in any add-source dir is changed, cabal will rebuild it 
> automatically

If possible, I might prefer to just delete the pandoc-1.13.1 source 
subdirectory entirely, as long as it doesn?t mess up the current hakyll 
installation. Is that possible?  If not, in the future, once the version of 
Pandoc in Hackage has been updated, is it then possible to remove the added 
source?

Thanks,


James

------------------------------

Message: 2
Date: Sat, 20 Sep 2014 19:08:24 +0200
From: Nadir Sampaoli <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Patch source, then pickup compile
Message-ID:
        <cafywtdrzjppo220jkrgql-u6exaegp_otjjza5yrdq9+0nb...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Il 20/set/2014 18:58 "James Toll" <[email protected]> wrote:
>
> I do have one concern though.  The part where you mention that if any of
the source files are changed, then cabal will rebuild.  I don?t want or
need that functionality given that this is supposed to be a temporary work
around until the fixed version of Pandoc is in Hackage.

According to the wiki ("sandboxes: advanced usage" section) you should use
`cabal sandbox add-source --snapshot` "which disables the change tracking".

>
> If possible, I might prefer to just delete the pandoc-1.13.1 source
subdirectory entirely, as long as it doesn?t mess up the current hakyll
installation. Is that possible?  If not, in the future, once the version of
Pandoc in Hackage has been updated, is it then possible to remove the added
source?
To remove an added source I think the correct sandbox subcommand is
`delete-source`. See the --help for more info.

--
Nadir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20140920/40401c28/attachment-0001.html>

------------------------------

Message: 3
Date: Sat, 20 Sep 2014 12:41:28 -0500
From: James Toll <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Patch source, then pickup compile
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252


On Sep 20, 2014, at 12:08 PM, Nadir Sampaoli <[email protected]> wrote:

> 
> Il 20/set/2014 18:58 "James Toll" <[email protected]> wrote:
> >
> > I do have one concern though.  The part where you mention that if any of 
> > the source files are changed, then cabal will rebuild.  I don?t want or 
> > need that functionality given that this is supposed to be a temporary work 
> > around until the fixed version of Pandoc is in Hackage.
> 
> According to the wiki ("sandboxes: advanced usage" section) you should use 
> `cabal sandbox add-source --snapshot` "which disables the change tracking".
> 
> >
> > If possible, I might prefer to just delete the pandoc-1.13.1 source 
> > subdirectory entirely, as long as it doesn?t mess up the current hakyll 
> > installation. Is that possible?  If not, in the future, once the version of 
> > Pandoc in Hackage has been updated, is it then possible to remove the added 
> > source?
> To remove an added source I think the correct sandbox subcommand is 
> `delete-source`. See the --help for more info.

Yes, thank you.  The ??snapshot' was in the documentation.  I should have 
noticed it.

The 'delete-source' doesn?t appear to be in the ?cabal sandbox ?help? page, 
although 'cabal sandbox list-sources? supposedly mentions it once you have 
local build trees.  I'll see if that ends up being the case.

Thank you.

James



------------------------------

Message: 4
Date: Sat, 20 Sep 2014 20:26:40 -0500
From: James Toll <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Patch source, then pickup compile
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252


On Sep 20, 2014, at 12:08 PM, Nadir Sampaoli <[email protected]> wrote:
> Il 20/set/2014 18:58 "James Toll" <[email protected]> wrote:
> >
> > I do have one concern though.  The part where you mention that if any of 
> > the source files are changed, then cabal will rebuild.  I don?t want or 
> > need that functionality given that this is supposed to be a temporary work 
> > around until the fixed version of Pandoc is in Hackage.
> 
> According to the wiki ("sandboxes: advanced usage" section) you should use 
> `cabal sandbox add-source --snapshot` "which disables the change tracking".
> 
> >
> > If possible, I might prefer to just delete the pandoc-1.13.1 source 
> > subdirectory entirely, as long as it doesn?t mess up the current hakyll 
> > installation. Is that possible?  If not, in the future, once the version of 
> > Pandoc in Hackage has been updated, is it then possible to remove the added 
> > source?
> To remove an added source I think the correct sandbox subcommand is 
> `delete-source`. See the --help for more info.


I wish I could say that I got this to work, but I?ve had no success.  The 
problem I?m having is that I can?t even get 'cabal sandbox add-source 
--snapshot? to work.  This is what I?m trying to do, and the output:

$ mkdir hakyll
$ cd hakyll
$ cabal sandbox init --sandbox .
$ cabal install -j hakyll
[compilation fails]
$ cabal get pandoc-1.13.1
$ cabal sandbox add-source --snapshot pandoc-1.13.1/
cabal: Error: Could not find module: Text.Pandoc.Data with any suffix:
["gc","chs","hsc","x","y","ly","cpphs","hs","lhs?]

This last command creates the ?snapshots' directory within the hakyll 
directory.  Snapshots contains an empty subdirectory called 
?pandoc-1.13.1-tmp?. If I then try a different slightly different path to 
pandoc, it fails, but differently:

$ cabal sandbox add-source --snapshot ./pandoc-1.13.1/
cabal: /Users/james/src/haskell/sandboxes/hakyll/snapshots/pandoc-1.13.1: does
not exist

If I delete the ?snapshots? directory, it fails with the first error where it 
can?t find the module.

What am I doing wrong?  I?ve tried many different iterations of this.  
Executing the command from within the pandoc directory, renaming the directory, 
plus many other variations.  Nothing has worked.  How is this supposed to work. 
 It just doesn?t seem like it should be this hard.

Thanks.

James




------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 75, Issue 16
*****************************************

Reply via email to