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

Remove non rpc interface methods AnalogNames and DigitalInterruptNames from board #4626

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

randhid
Copy link
Member

@randhid randhid commented Dec 12, 2024

We can now do this cleanup chore since Status and StatusStream are completely unused and the reason for these rpcs to exist is now gone.

Tested with Viam server running on a mac with a few fake modular boards.

Will probably wait to merge until SDK work is complete.

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Dec 12, 2024
Copy link
Contributor

Warning your change may break code samples. If your change modifies any of the following functions please contact @viamrobotics/fleet-management. Thanks!

component function
base IsMoving
board GPIOPinByName
camera Properties
encoder Properties
motor IsMoving
sensor Readings
servo Position
arm EndPosition
audio MediaProperties
gantry Lengths
gripper IsMoving
input_controller Controls
movement_sensor LinearAcceleration
power_sensor Power
pose_tracker Poses
motion GetPose
vision GetProperties

@martha-johnston
Copy link
Contributor

can modular boards still optionally implement these functions? or will it break them all, including pi?

@@ -92,22 +92,6 @@ func (c *client) GPIOPinByName(name string) (GPIOPin, error) {
}, nil
}

func (c *client) AnalogNames() []string {
if len(c.info.analogNames) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

can boardInfo be removed? seems like we only used it for storing all the names

Copy link
Member Author

Choose a reason for hiding this comment

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

Will check it out.

@JohnN193
Copy link
Member

can modular boards still optionally implement these functions? or will it break them all, including pi?

modules should be unaffected by this. They would just have extra exported methods on their structs

@randhid
Copy link
Member Author

randhid commented Dec 13, 2024

can modular boards still optionally implement these functions? or will it break them all, including pi?

modules should be unaffected by this. They would just have extra exported methods on their structs

This is in fact what happens with an interface removal in go and it is harmless for board modules. With this change I'm no longer forcing module authors to implement these methods that could not be accessed.

You can consider the addition of an API to be a forward breaking change for modules. The module will need to implement the new method. Removing a method does not break a module, as the AnalogNames method can just sit there doing nothing in the module code after rdk is updated in that module. It's actually the opposite of the normal breaking API change rules. Good question to ask martha.

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Dec 13, 2024
@randhid
Copy link
Member Author

randhid commented Dec 14, 2024

Going to wait till I'm back from vacation to merge

@martha-johnston good remote work is doing the corresponding changes in sdks - do go ahead and make tickets for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants