klappvisor / haskell-telegram-api

Telegram Bot API for Haskell
BSD 3-Clause "New" or "Revised" License
202 stars 67 forks source link

Building as dependency with Stack runs out of memory #108

Open viviag opened 6 years ago

viviag commented 6 years ago

https://github.com/commercialhaskell/stack/issues/3637

It's all true for current version also.

klappvisor commented 6 years ago

hm, interesting. Thanks for reporting it, I can try to reproduce it using stack v1.6.1

decentral1se commented 6 years ago

You were able to reproduce it @klappvisor?

ibnuda commented 6 years ago

Oh, I should have posted this comment to here. Sorry.

fizruk commented 6 years ago

This might have to do with either

Because I couldn't have telegram-api built successfully and fast enough on my laptop, I have rewritten a part of Telegram API while working on an experimental high-level Telegram bot package https://github.com/fizruk/telegram-bot-simple.

Specifically, I have chosen to

My package builds a lot faster and requires much less memory than telegram-api and already can do most of the useful stuff, so I guess you could borrow those 2 ideas to make this package ~great~ build fast again :)

why-not-try-calmer commented 3 years ago

This might have to do with either

  • having a huge unifying TelegramBotAPI type (and deriving client for that);
  • having a lot of Generic-based deriving for large record types.

Because I couldn't have telegram-api built successfully and fast enough on my laptop, I have rewritten a part of Telegram API while working on an experimental high-level Telegram bot package https://github.com/fizruk/telegram-bot-simple.

Specifically, I have chosen to

  • have a separate type and client derivation per endpoint;
  • use deriveJSON via Template Haskell to speed up the build (for large record types, such as Message).

My package builds a lot faster and requires much less memory than telegram-api and already can do most of the useful stuff, so I guess you could borrow those 2 ideas to make this package ~great~ build fast again :)

But you don't provide support for webhook, do you?