[ { "kind": "Listing", "data": { "modhash": null, "dist": 1, "children": [ { "kind": "t3", "data": { "approved_at_utc": null, "subreddit": "rust", "selftext": "", "user_reports": [], "saved": false, "mod_reason_title": null, "gilded": 0, "clicked": false, "title": "rust-analyzer: next few years", "link_flair_richtext": [], "subreddit_name_prefixed": "r/rust", "hidden": false, "pwls": 6, "link_flair_css_class": null, "downs": 0, "parent_whitelist_status": "all_ads", "hide_score": false, "name": "t3_gm1nr6", "quarantine": false, "link_flair_text_color": "dark", "upvote_ratio": 1, "author_flair_background_color": "", "subreddit_type": "public", "ups": 211, "total_awards_received": 0, "media_embed": {}, "author_flair_template_id": null, "is_original_content": false, "author_fullname": "t2_f5d2i", "secure_media": null, "is_reddit_media_domain": false, "is_meta": false, "category": null, "secure_media_embed": {}, "link_flair_text": null, "can_mod_post": false, "num_duplicates": 0, "approved_by": null, "author_premium": true, "thumbnail": "", "edited": false, "author_flair_css_class": null, "author_flair_richtext": [], "gildings": {}, "content_categories": null, "is_self": false, "mod_note": null, "created": 1589838074, "link_flair_type": "text", "wls": 6, "removed_by_category": null, "banned_by": null, "author_flair_type": "text", "domain": "rust-analyzer.github.io", "allow_live_comments": false, "selftext_html": null, "likes": null, "suggested_sort": null, "banned_at_utc": null, "view_count": null, "archived": false, "score": 211, "no_follow": false, "is_crosspostable": true, "pinned": false, "over_18": false, "all_awardings": [], "awarders": [], "media_only": false, "can_gild": true, "spoiler": false, "locked": false, "author_flair_text": "rust-analyzer", "treatment_tags": [], "visited": false, "removed_by": null, "num_reports": null, "distinguished": null, "subreddit_id": "t5_2s7lj", "mod_reason_by": null, "removal_reason": null, "link_flair_background_color": "", "id": "gm1nr6", "is_robot_indexable": true, "report_reasons": null, "author": "matklad", "discussion_type": null, "num_comments": 53, "send_replies": true, "media": null, "contest_mode": false, "author_patreon_flair": false, "author_flair_text_color": "dark", "permalink": "/r/rust/comments/gm1nr6/rustanalyzer_next_few_years/", "whitelist_status": "all_ads", "stickied": false, "url": "https://rust-analyzer.github.io/blog/2020/05/18/next-few-years.html", "subreddit_subscribers": 100028, "created_utc": 1589809274, "num_crossposts": 0, "mod_reports": [], "is_video": false } } ], "after": null, "before": null } }, { "kind": "Listing", "data": { "modhash": null, "dist": null, "children": [ { "kind": "t1", "data": { "total_awards_received": 0, "approved_at_utc": null, "ups": 24, "awarders": [], "mod_reason_by": null, "banned_by": null, "author_flair_type": "text", "removal_reason": null, "link_id": "t3_gm1nr6", "author_flair_template_id": "4c3a495a-89df-11e3-a482-12313d27e9a3", "likes": null, "replies": { "kind": "Listing", "data": { "modhash": null, "dist": null, "children": [ { "kind": "t1", "data": { "total_awards_received": 0, "approved_at_utc": null, "ups": 10, "awarders": [], "mod_reason_by": null, "banned_by": null, "author_flair_type": "text", "removal_reason": null, "link_id": "t3_gm1nr6", "author_flair_template_id": "4c3a495a-89df-11e3-a482-12313d27e9a3", "likes": null, "replies": { "kind": "Listing", "data": { "modhash": null, "dist": null, "children": [ { "kind": "t1", "data": { "total_awards_received": 0, "approved_at_utc": null, "ups": 6, "awarders": [], "mod_reason_by": null, "banned_by": null, "author_flair_type": "text", "removal_reason": null, "link_id": "t3_gm1nr6", "author_flair_template_id": "4c3a495a-89df-11e3-a482-12313d27e9a3", "likes": null, "replies": "", "user_reports": [], "saved": false, "id": "fr25ts7", "banned_at_utc": null, "mod_reason_title": null, "gilded": 0, "archived": false, "no_follow": false, "author": "DroidLogician", "can_mod_post": false, "created_utc": 1589831656, "send_replies": true, "parent_id": "t1_fr1xpdk", "score": 6, "author_fullname": "t2_av4v8", "report_reasons": null, "approved_by": null, "all_awardings": [], "subreddit_id": "t5_2s7lj", "body": "This isn't to say that we're not willing to work with the compiler team to try to encapsulate the non-determinism. I feel like there's some happy middle-ground we could reach where `sqlx::query!()` somehow communicates to RA the conditions for invalidating its cached output.", "edited": false, "author_flair_css_class": "contrib", "is_submitter": false, "downs": 0, "author_flair_richtext": [], "author_patreon_flair": false, "body_html": "
This isn't to say that we're not willing to work with the compiler team to try to encapsulate the non-determinism. I feel like there's some happy middle-ground we could reach where sqlx::query!()
somehow communicates to RA the conditions for invalidating its cached output.
We'd love to have really great IDE compatibility, but making the proc macros completely deterministic would be quite the undertaking at this point in time.
\n\nThere are crates out there to parse SQL that we could build off of, sqlparser
seems to be the most mature of them, but that's only half the battle; we'd have to typecheck the SQL as well, and at that point we're basically reimplementing a good chunk of the frontend of any given database flavor.
\n\n\nI am slightly worried that this will get push-back from folks who want to connect to databases over TCP at compile time :)
\n
I bet the SQLx people will be more supportive than you realize.
\n