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

fix(@angular-devkit/build-angular): passing port 0 when using serve w… #13919

Merged
merged 1 commit into from Mar 19, 2019
Merged

fix(@angular-devkit/build-angular): passing port 0 when using serve w… #13919

merged 1 commit into from Mar 19, 2019

Conversation

alan-agius4
Copy link
Collaborator

…ill not find a suitable port

At the moment, when passing port 0 it will default to 4200 which is incorrect. 4200 should be used a baseport.

This is the same as https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/dev-server/index2.ts#L127

…ill not find a suitable port

At the moment, when passing port `0` it will default to `4200` which is incorrect. `4200` should be used a baseport.
@alan-agius4 alan-agius4 reopened this Mar 14, 2019
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Mar 14, 2019
@clydin
Copy link
Member

clydin commented Mar 14, 2019

That entire function should technically be bypassed if the port is zero. The OS knows how to properly handle allocation of the port and can do it far more efficiently than the manual method employed in the check port function.

@alan-agius4
Copy link
Collaborator Author

alan-agius4 commented Mar 14, 2019

@clydin, totally agree and I think it should be changed through the number of builders that are using it.
I'll try to fit that refactoring and removing the check port method in the coming days, before the RC.

Although in some cases, we rely on the fact of knowing the port before starting the server.

@alexeagle alexeagle merged commit 20a644e into angular:master Mar 19, 2019
@alan-agius4 alan-agius4 deleted the fix-port-zero branch March 19, 2019 16:24
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants