Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Next.js start script - second long-running task #297

Open
5 tasks
AWolf81 opened this issue Oct 20, 2018 · 0 comments
Open
5 tasks

Next.js start script - second long-running task #297

AWolf81 opened this issue Oct 20, 2018 · 0 comments
Labels
bug Something isn't working Discussion Something to discuss

Comments

@AWolf81
Copy link
Collaborator

AWolf81 commented Oct 20, 2018

Describe the bug
After merging #292 we will have a new bug that's introduced by Next.js.
Next.js is adding a long-running task called start which is not properly handled by Guppy. We're only expecting one devServer task per project and here we're having two.
Also the task will not check that the port is not already in use.

I think this is no high priority issue as the Next.js devServer is working as expected.

To Reproduce

  1. Create/Open a Next.js project
  2. Run the start task with an open TaskDetailsModal
  3. The message tells Task completed instead of Running

Expected behavior
We need to allow many long running tasks (1 to n tasks) and display this accordingly.
Also adding a isPortAvailable check is needed.
This could be related to #296 as we need to store the isLongRunningTask info somewhere either in state or in a configuration file.

I'm imaging it should be like every task can be toggled from short- to long-running in a tasks setting dialog & also there should be an option to select if a port check is required. Not sure if that's too complicated but that way we can add user customizable tasks for advanced users later.

Todo

  • Add a property to devServer config. longRunning: true - I prefer longRunning over sustained as it is more clear.
  • Rename devServerTaskNameMap to longRunningTaskNameMap as we can also have non-devserver tasks in the map
  • Change longRunningTaskNameMap to use longRunning prop from config
  • Update getTaskType in tasks.reducer
  • Check isDevServerTask function in tasks.reducer - do we need to change it?

Screenshots

grafik

Environment:

  • OS: Windows 10
  • Version: -
  • Node version: -
@AWolf81 AWolf81 added bug Something isn't working Discussion Something to discuss labels Oct 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Discussion Something to discuss
Projects
None yet
Development

No branches or pull requests

1 participant