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

Managed Resource Parser is not aware of some Resource types, and fails to provide intellisense for them. #1262

Closed
fullmetaltac opened this Issue Feb 1, 2018 · 9 comments

Comments

Projects
None yet
3 participants
@fullmetaltac

fullmetaltac commented Feb 1, 2018

Steps to Reproduce

  1. Rebuild project.
  2. Right click on project -> Unload project.
  3. Right click on project -> Reload project.
  4. Navigate to class that contain Resource.Plurals or Resource.String etc.

image

Expected Behavior

Resource object should be available via Intellisense.

Actual Behavior

Resource object is not availabe via Intellisense.

Version Information

15.6.0 Preview 3.0
VS_info.txt

Comment

During sample porting all resources where available except Plurals. After that I decided to Rebuild -> Unload -> Reload project.
I think it's related to Design Time builds. Strange that another resources like String and Id where available. They all lying on the same level.
image

@dellis1972

This comment has been minimized.

Contributor

dellis1972 commented Feb 5, 2018

Our initial version of the ManagedResourceParser [1] which is used for design time builds does not contain any code to handle Plurals resources. So that is one problem.

The other one, are you able to get us the design time build logs via [2] ?

[1] https://github.com/xamarin/xamarin-android/blob/master/src/Xamarin.Android.Build.Tasks/Utilities/ManagedResourceParser.cs#L32
[2] https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md#visual-studio-2017-version-153-or-earlier

@dellis1972 dellis1972 added the need-info label Feb 6, 2018

@fullmetaltac

This comment has been minimized.

fullmetaltac commented Feb 8, 2018

@dellis1972 Hi. I created build logs.

BuildLogs.zip

@pjcollins

This comment has been minimized.

Member

pjcollins commented Feb 16, 2018

Considering that the first step here is:

  1. Rebuild project.

I'm thinking that this will be resolved by the fix mentioned in #1286

@pjcollins pjcollins removed the need-info label Feb 16, 2018

@pjcollins

This comment has been minimized.

Member

pjcollins commented Feb 16, 2018

While part of the issue discussed here appears to be a duplicate of #1268, there is still a consideration for Plurals resources as Dean mentions in his previous comment. I will leave this issue open to track that discrepancy. We should also do a thorough review of everything mentioned in the Android resource documentation below to make sure that this new parser handles all expected types and any relevant children (e.g. Plurals):

https://developer.android.com/guide/topics/resources/available-resources.html

@pjcollins

This comment has been minimized.

Member

pjcollins commented Feb 16, 2018

At a first glance it looks like we may need to add Animator, Font, Menu, and Plurals to the managed resource parser.

@pjcollins pjcollins changed the title from Intellisense doesn't see Resource object while build is successful. to Managed Resource Parser is not aware of some Resource types, and fails to provide intellisense for them. Feb 16, 2018

@pjcollins pjcollins added this to the d15-7 milestone Feb 16, 2018

@pjcollins

This comment has been minimized.

Member

pjcollins commented Feb 16, 2018

Updating the milestone to 15.7, as this has now been disabled for 15.6.

@dellis1972

This comment has been minimized.

Contributor

dellis1972 commented Feb 16, 2018

@pjcollins any chance you can post an example layout(s) which contain the missing items? it would help me update the unit tests.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 22, 2018

[Xamarin.Android.Build.Tasks] Added support for missing resource types
Fixes xamarin#1262

The initial version of the ManagedResourceParser was missing
some types. Specifically `Menu`, `Animator`, `Plurals`,
`Mipmap` and `Font`. This commit adds support for those
missing types. It also adds a Task unit test for the Parser
so ensure that the types are added.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 26, 2018

[Xamarin.Android.Build.Tasks] Added support for missing resource types
Fixes xamarin#1262

The initial version of the ManagedResourceParser was missing
some types. Specifically `Menu`, `Animator`, `Plurals`,
`Mipmap` and `Font`. This commit adds support for those
missing types. It also adds a Task unit test for the Parser
so ensure that the types are added.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Feb 27, 2018

[Xamarin.Android.Build.Tasks] Added support for missing resource types
Fixes xamarin#1262

The initial version of the ManagedResourceParser was missing
some types. Specifically `Menu`, `Animator`, `Plurals`,
`Mipmap` and `Font`. This commit adds support for those
missing types. It also adds a Task unit test for the Parser
so ensure that the types are added.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Mar 8, 2018

[Xamarin.Android.Build.Tasks] Added support for missing resource types
Fixes xamarin#1262

The initial version of the ManagedResourceParser was missing
some types. Specifically `Menu`, `Animator`, `Plurals`,
`Mipmap` and `Font`. This commit adds support for those
missing types. It also adds a Task unit test for the Parser
so ensure that the types are added.

dellis1972 added a commit to dellis1972/xamarin-android that referenced this issue Mar 8, 2018

[Xamarin.Android.Build.Tasks] Added support for missing resource types
Fixes xamarin#1262

The initial version of the ManagedResourceParser was missing
some types. Specifically `Menu`, `Animator`, `Plurals`,
`Mipmap` and `Font`. This commit adds support for those
missing types. It also adds a Task unit test for the Parser
so ensure that the types are added.

jonpryor added a commit that referenced this issue Mar 8, 2018

[Xamarin.Android.Build.Tasks] Added support for missing resource types (
#1329)

Fixes: #1262

The initial version of the `ManagedResourceParser` lacked support
some types, specifically `Menu`, `Animator`, `Plurals`, `Mipmap`, and
`Font`. This commit adds support for those missing types. It also adds
a Task unit test for the Parser so ensure that the types are added.

jonpryor added a commit that referenced this issue Mar 9, 2018

[Xamarin.Android.Build.Tasks] Added support for missing resource types (
#1329)

Fixes: #1262

The initial version of the `ManagedResourceParser` lacked support
some types, specifically `Menu`, `Animator`, `Plurals`, `Mipmap`, and
`Font`. This commit adds support for those missing types. It also adds
a Task unit test for the Parser so ensure that the types are added.
@pjcollins

This comment has been minimized.

Member

pjcollins commented Apr 3, 2018

Intellisense for the examples listed above for Animator, Font, Menu, and Plurals is working as expected for me with the new managed resource parser system enabled in d15-7 (XA 8.3.0.11).

@pjcollins pjcollins added the verified label Apr 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment