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

build(PC): remove unused tasks for running headless server from source #4463

Merged
merged 4 commits into from
Feb 21, 2021

Conversation

keturn
Copy link
Member

@keturn keturn commented Feb 3, 2021

In the PC facade build config, removes tasks server, setupServerModules, setupServerConfig at the suggestion of #4454 (comment)

Those setup tasks have a significant amount of code so removing them will slim the build config down considerably.

@keturn
Copy link
Member Author

keturn commented Feb 4, 2021

Cervator clarifies:

the headless run config in IntelliJ and the server JavaExec in Gradle without all the awkward extras that try to generate a config.cfg for you really should be enough. The only real thing those extras (setupServerConfig + setupServerModules) did was allow you to not have to hand-configure override.cfg - which is so much easier at this point
those are the bits i meant to say could probably go away, not the tasks.register("server") thing itself. It could just hard code the -homedir=... arg and include the flag for override.cfg instead, much like the IntelliJ run config

@keturn keturn marked this pull request as draft February 4, 2021 20:01
Copy link
Member Author

@keturn keturn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to leave the server exec task intact.

@keturn keturn marked this pull request as ready for review February 5, 2021 19:06
@keturn keturn added the Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc. label Feb 5, 2021
Copy link
Member

@Cervator Cervator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay less mess! One bonus comment left that would be an enhancement, previously to test headless via Gradle we'd either need to tweak something manually ahead of time or start the server once, edit the generated config.cfg and restart.

// TODO: Make a task to reset server / game data
tasks.register<RunTerasology>("server") {
description = "Starts a headless multiplayer server with data stored in [project-root]/$localServerDataPath"
dependsOn("setupServerConfig")
dependsOn("setupServerModules")
args("-headless", "-homedir=$localServerDataPath")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add -overrideDefaultConfig=override.cfg here to match the headless run config for IntelliJ 👍

@skaldarnar skaldarnar added this to the v4.3.0 milestone Feb 21, 2021
@skaldarnar skaldarnar merged commit aa16781 into develop Feb 21, 2021
@skaldarnar skaldarnar deleted the build/remove-server-tasks branch February 21, 2021 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Build/CI Requests, Issues and Changes targeting gradle, groovy, Jenkins, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants