Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@more is flaky #199

Open
int-e opened this issue May 22, 2021 · 3 comments
Open

@more is flaky #199

int-e opened this issue May 22, 2021 · 3 comments

Comments

@int-e
Copy link
Member

int-e commented May 22, 2021

@more tends error in a Prelude.init, e.g.:

<int-e> > fmap ( 5) 4
<lambdabot>  error:
<lambdabot>      • Ambiguous type variable ‘f0’ arising from a use of ‘show_M50517827754851862467’
<lambdabot>        prevents the constraint ‘(Show (f0 Integer))’ from being solved.
<lambdabot>        Probable fix: use a type annotation to specify what ‘f0’ should be.
<lambdabot>        These potential instances exist:
<lambdabot> [15 @more lines]
<int-e> @more
<lambdabot> Plugin `more' failed with: Prelude.init: empty list

As far as I recall, it has always been flaky, but apparently it's getting worse.

@int-e
Copy link
Member Author

int-e commented Jun 13, 2021

This particular use of init was only present in the libera branch, and should be fixed now. However, there's a deeper problem in @more; it should not forget all its history like that.

@int-e
Copy link
Member Author

int-e commented Jun 29, 2021

@more is forgetful by design: There is an LRU list of buffers for @more, indexed by nickname (or channel name). The list has size 20 by default...

{ moduleDefState = return $ mkGlobalPrivate 20 ()

Apparently lambdabot has more concurrent users than that? Maybe silent commands trigger the output filter, and that includes things like the seen or karma modules that provide contextual processing?

Note also that here,

writePS target $ if null morelines then Nothing else Just morelines

a new entry is allocated for the current target even if no more lines are being stored... that's not ideal. (writePS is for "write private state", which is an abstraction of state indexed by a target nick.) See the Lambdabot.State module for details.

@int-e
Copy link
Member Author

int-e commented Jun 29, 2021

There is another way for lambdabot to lose messages: lambdabot has a rate limit for its output. But output is synchronous; a command that produces output has to wait until that output can be sent... and while waiting it can run into a timeout, which will abort it (silently, as far as the users are concerned). Eww.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant