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

Devroot cleanup #2974

Merged
merged 5 commits into from
Oct 7, 2022
Merged

Devroot cleanup #2974

merged 5 commits into from
Oct 7, 2022

Conversation

devinrsmith
Copy link
Member

@devinrsmith devinrsmith commented Oct 6, 2022

This removes the necessity for the devroot property to be set - it doesn't make sense for end-users. In code-generation or test cases where access to the source is still necessary, the appropriate system properties can be set as necessary.

@devinrsmith devinrsmith added this to the Oct 2022 milestone Oct 6, 2022
@devinrsmith devinrsmith self-assigned this Oct 6, 2022
@devinrsmith devinrsmith requested a review from rcaudy October 6, 2022 20:38
@devinrsmith devinrsmith marked this pull request as ready for review October 6, 2022 20:38
devroot = args[0];
} else if (args.length == 2) {
devroot = args[0];
assertNoChange = Boolean.parseBoolean(args[1]);
} else {
System.out.println("Usage: [<devroot> [assertNoChange]]");
System.out.println("Usage: <devroot> [assertNoChange]");
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested all of the generators?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've run ./gradlew Generators:generateAll and I think testing should also assert all the generators are correct.

.getProperty("PythonDeephavenSession.defaultScriptPath")
.replace("<devroot>", Configuration.getInstance().getDevRootPath())
.replace("<workspace>", Configuration.getInstance().getWorkspacePath());
.getStringWithDefault("PythonDeephavenSession.defaultScriptPath", ".");
Copy link
Member

Choose a reason for hiding this comment

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

Are we confident about making . the new default for all the script sessions? What testing have you done?

Copy link
Member Author

Choose a reason for hiding this comment

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

This previous defaults were <X>.defaultScriptPath=<devroot>; and by default, devroot=.. So in theory, it's the same defaults as before, just a layer of indirection removed.

I think the defaultScriptPath logic could use serious reworking - I'm not sure it makes sense anymore if we have a better way w/ application mode. There's a comment to this effect in io.deephaven.engine.util.ScriptFinder#findScriptEx

I've run locally natively in python and groovy. I'll do testing in docker as well. I'll start a nightly as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Everything I've run seems to work. nightly is passing except I hit this #2732

Copy link
Member Author

Choose a reason for hiding this comment

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

Also run python embedded server, work fine.

.getProperty("PythonDeephavenSession.defaultScriptPath")
.replace("<devroot>", Configuration.getInstance().getDevRootPath())
.replace("<workspace>", Configuration.getInstance().getWorkspacePath());
.getStringWithDefault("PythonDeephavenSession.defaultScriptPath", ".");
Copy link
Member

Choose a reason for hiding this comment

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

Related to this change:
io.deephaven.engine.util.ScriptFinder#findScriptEx(java.lang.String, java.lang.String) has some comments that probably need cleanup after devroot is retired.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ha! Just mentioned this in the previous comment before I noticed this.

Copy link
Member Author

Choose a reason for hiding this comment

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

@devinrsmith devinrsmith merged commit ee93592 into deephaven:main Oct 7, 2022
@devinrsmith devinrsmith deleted the devroot-cleanup branch October 7, 2022 20:21
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants