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
Built-in variables flagged as errors? #3762
Comments
Could you please add the code that reproduces this issue? Thanks! |
Smells like a resolver bug.
I have build 2.1.2.2709 here, ..a bit dated, but if the version you're using (what version are you using?) is newer than that and doesn't resolve the constant / enum member, then we're looking at a regression bug with the resolver, rather than an inspection false positive.. |
@Vogel612 Here are two examples:
@retailcoder Not 100% positive I understand, but here's what I see: Next to that is a button that says "2 references". Clicking on it brings up search results: I have Rubberduck v 2.1.1.2482 I have Rubberduck v 2.1. Sidenote: I ended up commenting out code that was causing the dbText errors as I realized that I don't need that code. |
@alexkadis hmmm the later 2.1.2 pre-releases aren't super-stable yet, but it looks like the problem was addressed and fixed somewhere between 2.1.1.2482 and 2.1.2.2709. @Vogel612 I wouldn't consider it a regression/bug unless it can be reproduced with current/next 😉 |
What 2.1.1.2482 is seeing is an undeclared variable in the The resolver is a critically important part at the very core of Rubberduck, responsible for resolving identifier declarations and references - if that part doesn't work exactly as it should, then Rubberduck isn't understanding the code the way we mean it to be understanding it... and that makes some inspections fire results when they shouldn't, e.g. "variable is not declared", because the resolver couldn't locate the referenced identifier, so it treated it as an undeclared variable. |
Just to help us a bit -- I noticed you are using Access 2013 but you are referencing DAO 3.6 which is quite an old library (last used by Access 2003). Can you change to Just want to be sure it's not an artifact of using older library than the PIA that's shipped w/ Rubberduck. |
@bclothier does that mean I should replace all of my |
@retailcoder what version would you like me to try running? |
@alexkadis No. The |
@bclothier Ok. Here's my new references: Compiling works great (faster too!) The errors persist. |
@alexkadis best is to keep up with the pre-releases; pull requests get merged pretty much every week, and every time a pre-release tag is automatically made available - you can click the merge commit link (1) or the AppVeyor link (2) to view the merge commit message (which I try to make as descriptive as possible), diff and build details (diff on GitHub, build details on AppVeyor), and decide if you want to use that version or not: For example the commit message for this particular tag says:
That doesn't directly affect anything user-facing, so you might want to wait for another build if you're not experiencing settings-related issues with your current install. The previous pre-release was:
The previous significant pre-release build was .2817:
That was a grammar/parser fix for a bug introduced while upgrading our parser generator to Antlr 4.6, a problem that wasn't present in 2.1.2.2803. As you can see, things are constantly moving, usually in the right direction 😀 ...but using the pre-release builds is a bit like using "Microsoft Insider - Fast" builds, where you get to see every single update, and an opportunity to provide extremely valuable feedback on the latest/current version. Alternatively, you could stick to "green releases" (latest was v2.1.1), which move much more slowly (I tend to never be satisfied enough with the current build to deem it "release-ready"...thank the rest of the team for pushing me to release!). Lastly, if you have Visual Studio Community 2017 (free) and local admin privs, you can build & register Rubberduck yourself, and with git properly configured you can keep up-to-date without needing to monitor the GitHub repository (or Twitter / RD News announcements), simply with I should probably put that somewhere in the readme/wiki... Whatever you choose to do, remember to always manually uninstall Rubberduck from the control panel's add/remove programs feature, before running the installer for the newer version. |
This appears to be fixed in |
In Code Quality issues I see a few errors that don't make sense to me. Maybe it's just a limit of Rubberduck? I'm betting it's a code problem on my end though (maybe related to references?)
Examples:
Variable 'dbText' is used but not assigned
Local variable 'dbText' is not declared
Variable 'dbText' is not assigned
This also happens with dbCurrency, dbOpenSnapshot, dbAppendOnly
The references I'm using:
Visual Basic for Applications
Microsoft Access 15.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ADO Ext. 2.8 for DDL and Security
Microsoft ActiveX Data Objects 2.1 Library
Microsoft Access 2013
The text was updated successfully, but these errors were encountered: