Marios Titas | 31 Aug 06:45 2014
Picon

cabal sdist and auto-generated modules

I am trying to run cabal sdist on a package where one of exposed
modules does not exists because it is automatically generated by
setup.hs. cabal refuses to do that because it cannot find the file
corresponding to that module. Is there a solution to that problem? The
package builds just fine.
Mateusz Kowalczyk | 31 Aug 15:57 2014
Picon

Re: cabal sdist and auto-generated modules

On 08/31/2014 05:45 AM, Marios Titas wrote:
> I am trying to run cabal sdist on a package where one of exposed
> modules does not exists because it is automatically generated by
> setup.hs. cabal refuses to do that because it cannot find the file
> corresponding to that module. Is there a solution to that problem? The
> package builds just fine.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 

Does touch missingmodule.hs not do it for you?

--

-- 
Mateusz K.
Brandon Allbery | 31 Aug 16:11 2014
Picon

Re: cabal sdist and auto-generated modules

On Sun, Aug 31, 2014 at 9:57 AM, Mateusz Kowalczyk <fuuzetsu <at> fuuzetsu.co.uk> wrote:
On 08/31/2014 05:45 AM, Marios Titas wrote:
> I am trying to run cabal sdist on a package where one of exposed
> modules does not exists because it is automatically generated by
> setup.hs. cabal refuses to do that because it cannot find the file
> corresponding to that module. Is there a solution to that problem? The
> package builds just fine.

Does touch missingmodule.hs not do it for you?

Sounds like a bad idea, it would mean instead of generating the module it would take the empty file as the generated module and probably fail to build?

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b <at> gmail.com                                  ballbery <at> sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Mateusz Kowalczyk | 31 Aug 16:13 2014
Picon

Re: cabal sdist and auto-generated modules

On 08/31/2014 03:11 PM, Brandon Allbery wrote:
> On Sun, Aug 31, 2014 at 9:57 AM, Mateusz Kowalczyk <fuuzetsu <at> fuuzetsu.co.uk>
> wrote:
> 
>> On 08/31/2014 05:45 AM, Marios Titas wrote:
>>> I am trying to run cabal sdist on a package where one of exposed
>>> modules does not exists because it is automatically generated by
>>> setup.hs. cabal refuses to do that because it cannot find the file
>>> corresponding to that module. Is there a solution to that problem? The
>>> package builds just fine.
>>
>> Does touch missingmodule.hs not do it for you?
>>
> 
> Sounds like a bad idea, it would mean instead of generating the module it
> would take the empty file as the generated module and probably fail to
> build?
> 

Presumably setup.hs would take care to delete the ‘fake’ file with the
actual generated file at build time.

--

-- 
Mateusz K.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Marios Titas | 31 Aug 16:16 2014
Picon

Re: cabal sdist and auto-generated modules

Yes, including an empty (or dummy) file causes cabal build to fail
because it apparently prefers that file over the generated one in the
autogen directory.

On Sun, Aug 31, 2014 at 3:13 PM, Mateusz Kowalczyk
<fuuzetsu <at> fuuzetsu.co.uk> wrote:
> On 08/31/2014 03:11 PM, Brandon Allbery wrote:
>> On Sun, Aug 31, 2014 at 9:57 AM, Mateusz Kowalczyk <fuuzetsu <at> fuuzetsu.co.uk>
>> wrote:
>>
>>> On 08/31/2014 05:45 AM, Marios Titas wrote:
>>>> I am trying to run cabal sdist on a package where one of exposed
>>>> modules does not exists because it is automatically generated by
>>>> setup.hs. cabal refuses to do that because it cannot find the file
>>>> corresponding to that module. Is there a solution to that problem? The
>>>> package builds just fine.
>>>
>>> Does touch missingmodule.hs not do it for you?
>>>
>>
>> Sounds like a bad idea, it would mean instead of generating the module it
>> would take the empty file as the generated module and probably fail to
>> build?
>>
>
> Presumably setup.hs would take care to delete the ‘fake’ file with the
> actual generated file at build time.
>
> --
> Mateusz K.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Marios Titas | 31 Aug 18:28 2014
Picon

Re: cabal sdist and auto-generated modules

Also, isn't this a bad practice? I think setup.hs should not modify
the source tree in any way, it should only create/modify files in the
dist/ directory.

On Sun, Aug 31, 2014 at 3:16 PM, Marios Titas <redneb8888 <at> gmail.com> wrote:
> Yes, including an empty (or dummy) file causes cabal build to fail
> because it apparently prefers that file over the generated one in the
> autogen directory.
>
> On Sun, Aug 31, 2014 at 3:13 PM, Mateusz Kowalczyk
> <fuuzetsu <at> fuuzetsu.co.uk> wrote:
>> On 08/31/2014 03:11 PM, Brandon Allbery wrote:
>>> On Sun, Aug 31, 2014 at 9:57 AM, Mateusz Kowalczyk <fuuzetsu <at> fuuzetsu.co.uk>
>>> wrote:
>>>
>>>> On 08/31/2014 05:45 AM, Marios Titas wrote:
>>>>> I am trying to run cabal sdist on a package where one of exposed
>>>>> modules does not exists because it is automatically generated by
>>>>> setup.hs. cabal refuses to do that because it cannot find the file
>>>>> corresponding to that module. Is there a solution to that problem? The
>>>>> package builds just fine.
>>>>
>>>> Does touch missingmodule.hs not do it for you?
>>>>
>>>
>>> Sounds like a bad idea, it would mean instead of generating the module it
>>> would take the empty file as the generated module and probably fail to
>>> build?
>>>
>>
>> Presumably setup.hs would take care to delete the ‘fake’ file with the
>> actual generated file at build time.
>>
>> --
>> Mateusz K.
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe <at> haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane