Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
Fully Compatible
-
Repl 2021-01-25, Repl 2021-02-08
Description
As a part of this we should be finding all IDL specs for API V1 commands in the old directory and checking that no command was removed in the new directory. This corresponds to the following pseudocode:
# Check new commands' compatibility with old ones.
|
# Note, a command can be added to V1 at any time, it's ok if a
|
# new command has no corresponding old command.
|
old_commands = {}
|
for each file old_file in old_dir:
|
old_idl := idl.parser.parse(old_file)
|
if any commands in old_idl have non-empty api_version != "1":
|
# We're not ready to handle future API versions yet.
|
print error and quit
|
|
|
for each command old_cmd in old_idl:
|
if old_cmd.api_version == "":
|
continue
|
|
|
assert old_cmd.command_name not in old_commands
|
old_commands.add(old_cmd.command_name)
|
|
|
new_cmd := new_commands[old_cmd.command_name]
|
assert new_cmd is not null # Can't remove a command from V1
|
We should also check that the old and new commands' "namespace" and "type" fields haven't changed in incompatible ways.