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

Spinner success message dublication on CI #22

Open
ai opened this issue Nov 12, 2019 · 1 comment
Open

Spinner success message dublication on CI #22

ai opened this issue Nov 12, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@ai
Copy link

ai commented Nov 12, 2019

I got strange dublication in the CLI log and locally with disableSpins option:

- Downloading https://github.com/logux/logux/archive/master.zip
- Downloading https://github.com/logux/logux/archive/master.zip
- Downloading https://github.com/logux/core/archive/master.zip
- Downloading https://github.com/logux/logux/archive/master.zip
- Downloading https://github.com/logux/core/archive/master.zip
- Downloading https://github.com/logux/server/archive/master.zip
- logux downloaded
- Downloading https://github.com/logux/core/archive/master.zip
- Downloading https://github.com/logux/server/archive/master.zip
- logux downloaded
- logux-core downloaded
- Downloading https://github.com/logux/server/archive/master.zip
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Converting guides
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Converting guides
- Generating JSDoc
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Guide converted
- Generating JSDoc
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Guide converted
- JSDoc generated
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Guide converted
- JSDoc generated
- Building guides HTML
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Guide converted
- JSDoc generated
- Building guides HTML
- Building API HTML
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Guide converted
- JSDoc generated
- Building guides HTML
- API HTML generated
- logux downloaded
- logux-core downloaded
- logux-server downloaded
- Guide converted
- JSDoc generated
- Guides HTML generated
- API HTML generated

But with spinners (locally without disableSpins) everything works good.

I strarted this spinners only (pseudocode):

await Promise.all(projects.map(async ([url, name]) => {
  spin.add(`download-${ name }`, { text: `Downloading ${ url }` })
  await donwload(name, url)
  spin.succeed(`download-${ name }`, { text: `${ name } downloaded` })
})
Promise.all([
  async () => {
    spin.add('process-guides', { text: 'Converting guides' })
    await process()
    spin.succeed('process-guides', { text: 'Guide converted' })
  }),
  async () => {
    spin.add(`jsdoc${ projects.join() }`, { text: 'Generating JSDoc' })
    await jsdoc()
    spin.succeed(`jsdoc${ projects.join() }`, { text: 'JSDoc generated' })
  })
])
Promise.all([
  async () => {
    spin.add('build-api', { text: 'Building API HTML' })
    await buildHTML('guide')
    spin.succeed('build-api', { text: 'API HTML generated' })
  }),
  async () => {
    spin.add('build-pages', { text: 'Building guides HTML' })
    await buildHTML('api')
    spin.succeed('build-pages', { text: 'Guides HTML generated' })
  })
])

Could be an dublicate for #13

@jbcarpanelli jbcarpanelli added the bug Something isn't working label Dec 6, 2019
@rafipiccolo
Copy link

usually CI logs are not ncurse capable.
therefore i guess spinners just adds lines to the log instead of rewriting current lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants