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

Add Imports not offered after first submission #6587

Closed
amcasey opened this issue Nov 5, 2015 · 16 comments
Closed

Add Imports not offered after first submission #6587

amcasey opened this issue Nov 5, 2015 · 16 comments
Assignees
Labels
Milestone

Comments

@amcasey
Copy link
Member

amcasey commented Nov 5, 2015

  1. #r "System.Xml"
  2. typeof(ArrayList)

Expected: Lightbulb offering to import System.Collections
Actual: No lightbulb

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

Note that it works before the #r and it resumes working after #reset.

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

The compilation in which we are looking for the symbol has 45 ReferencedAssemblyNames but 0 References.

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

The underlying reference manager has 0 DirectiveReferences, 39 ImplicitReferences, and 7 ExplicitReferences.

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

The compilation has 0 ExternalReferences - that seems to be what's getting dropped.

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

Since the intention of Compilation.References seems to be to return references explicitly added via either compilation options or #r, it seems strange that it isn't just returning GetBoundReferenceManager().ExplicitReferences. There doesn't seem to be a performance advantage since retrieving the DirectiveReferences triggers binding of the reference manager anyway.

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

That change appears to have fixed this particular issue. I'll run the tests to try to figure out what it breaks.

@tmat
Copy link
Member

tmat commented Nov 5, 2015

I introduced ExplicitReferences just recently, for ask mode, so I haven't had a chance to do more cleanup, which would indeed be nice.

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

Unit tests are green on my box. Shall I create a PR?

@ManishJayaswal
Copy link
Contributor

@tmat let's investigate the fix here. We should take this fix to shiproom - ideally tomorrow at 1p

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

To be explicit: I'm pretty sure my change is just masking the problem.

@amcasey amcasey assigned tmat and unassigned amcasey Nov 5, 2015
@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

I'll keep investigating, but this really needs @tmat's input.

@tmat
Copy link
Member

tmat commented Nov 5, 2015

Looking

@amcasey
Copy link
Member Author

amcasey commented Nov 5, 2015

@tmat pointed out that it doesn't just fail after #r - it fails anywhere other than the first submission after a reset.

@amcasey amcasey changed the title Add Imports not offered after #r Add Imports not offered after first submission Nov 5, 2015
@ManishJayaswal ManishJayaswal modified the milestones: 1.2, 1.1 Nov 9, 2015
@amcasey
Copy link
Member Author

amcasey commented Nov 17, 2015

Please unskip the flagged IDE test when this is fixed.

@tmat tmat removed this from the 1.3 milestone May 23, 2016
@gafter gafter modified the milestones: 2.0 (Preview 3), 2.0 (RC) Jul 14, 2016
@tmat tmat modified the milestones: 2.1, 2.0 (RC) Oct 5, 2016
@tmat tmat modified the milestones: 15.6, 15.1 May 22, 2017
@tmat tmat modified the milestones: 15.5, 15.7, 15.later Oct 9, 2017
@jinujoseph jinujoseph modified the milestones: 15.6, Unknown Nov 3, 2017
@sharwell sharwell assigned sharwell and unassigned tmat Mar 1, 2018
@sharwell sharwell added the 4 - In Review A fix for the issue is submitted for review. label Mar 1, 2018
@sharwell sharwell modified the milestones: Unknown, 15.7 Mar 1, 2018
@amcasey
Copy link
Member Author

amcasey commented Mar 5, 2018

Does the scenario described in this issue work now? Or has it become moot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants