Skip to content

Copy a single main file into the users project#851

Open
ThadHouse wants to merge 3 commits intowpilibsuite:2027from
ThadHouse:generatefixedmain
Open

Copy a single main file into the users project#851
ThadHouse wants to merge 3 commits intowpilibsuite:2027from
ThadHouse:generatefixedmain

Conversation

@ThadHouse
Copy link
Copy Markdown
Member

This way wpilib doesn't publish 83 copies of Main.

Depends on wpilibsuite/allwpilib#8627

This way wpilib doesn't publish 83 copies of main
Copy link
Copy Markdown
Member

@Gold856 Gold856 left a comment

Choose a reason for hiding this comment

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

Perhaps all of the new const variables should be inlined? But I won't block on it except for the one place I commented on.

Comment thread vscode-wpilib/src/shared/generator.ts Outdated
.replace('org.wpilib.templates.timed.Robot.class', `${robotClass}.class`)
);

const robotMain = `first.Main`;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Inline this. It's rather far away from point of use.

@sciencewhiz
Copy link
Copy Markdown
Contributor

I made a build with both #851 and #852 to test.

If I create a new project, I end up two mains.
If I import a 2026 project, I also end up with two mains, and the "new" one points to the wrong class. It points to the old main, not the Robot class.

@sciencewhiz
Copy link
Copy Markdown
Contributor

If I create a new project, I end up two mains.

This isn't directly relate to this PR. It has to do with gradle clean not cleaning the resources/cpp & java folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants