-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add a lint for the Self
tuple struct soundness hole
#318
Conversation
This presents an interesting conundrum for existing plrust functions that were compiled before this lint. A new plrust with this lint will require it of any function it tries to load. This is our first new lint since initial release and I guess we didn’t quite sort this situation out ahead of time. I’m sure there’s a path forward here to allow existing functions to load, but it’s late here on the east coast. We can figure it out over the next few days. |
FWIW this pattern is quite rare, to the point where a crater run didn't find any offending patterns across all of crates.io (I've also made it take visibility into account, which should match the version run against crater). |
This might better demonstrate the problem: [v15.3][1488067] plrust=# create function existing_func() returns void language plrust as $$ Ok(None) $$;
CREATE FUNCTION
Time: 4013.340 ms (00:04.013)
[v15.3][1488067] plrust=# select existing_func();
existing_func
---------------
(1 row) go add a new lint to plrust [v15.3][1488636] plrust=# select existing_func();
ERROR:
0: Function not compiled with required lints: new_lint_please The question here is how do we do add a new lint without requiring it to have been applied to all existing functions? Do we just ignore the list of required lints for new functions? |
Yeah, I see. The issue isn't that code exists that would suddenly fail to compile, the issue is that this lint now exists and maybe we want to recompile existing functions to ensure they don't violate it. I don't have strong feelings but I think that's a step too painful. |
Exactly.
I think it's painful too. Also, plrust doesn't even have a "recompile" facility -- users would need to Or we (somehow) do that automatically during the extension version upgrade script, but that has a bunch of its own problems. |
See comments and such.