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

MethodAliasGenerator doesn't generate parameter attributes #2393

Closed
devlead opened this Issue Dec 13, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@devlead
Copy link
Member

commented Dec 13, 2018

Currently code gen omits parameter attributes, this means i.e. the GetCallerInfo generates wrong results when called without a context.

This source code

public static ScriptCallerInfo GetCallerInfo(
this ICakeContext context,
[CallerMemberName] string memberName = "",
[CallerFilePath] string sourceFilePath = "",
[CallerLineNumber] int sourceLineNumber = 0)
{

becomes

ScriptCallerInfo GetCallerInfo(
            string memberName = "",
            string sourceFilePath = "",
            int sourceLineNumber = 0)

Reference code:

@kcamp

This comment has been minimized.

Copy link
Collaborator

commented Dec 13, 2018

Happy to take a look at this 👍

@devlead

This comment has been minimized.

Copy link
Member Author

commented Dec 13, 2018

@kcamp pefect, assigned issue to you.

kcamp added a commit to kcamp/cake that referenced this issue Dec 14, 2018

kcamp added a commit to kcamp/cake that referenced this issue Dec 19, 2018

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Dec 19, 2018

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Dec 19, 2018

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Dec 19, 2018

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Dec 19, 2018

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Dec 20, 2018

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Dec 20, 2018

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Dec 20, 2018

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Dec 20, 2018

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Jan 2, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Jan 2, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Jan 4, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Jan 4, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Jan 4, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Jan 4, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Jan 4, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Jan 4, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Jan 8, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Jan 8, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Jan 19, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Jan 19, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Feb 15, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Feb 15, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Feb 21, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Feb 21, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

kcamp added a commit to kcamp/cake that referenced this issue Feb 28, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

kcamp added a commit to kcamp/cake that referenced this issue Feb 28, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

devlead added a commit to kcamp/cake that referenced this issue Mar 21, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

devlead added a commit to kcamp/cake that referenced this issue Mar 21, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

devlead added a commit to kcamp/cake that referenced this issue Mar 21, 2019

cake-buildGH-2393: First pass over supporting emitting parameter attr…
…ibutes

This directly resolves the problem described in the linked issue
(with supporting test coverage for the same), but the implementation
is limited to only those attributes having an empty constructor.

devlead added a commit to kcamp/cake that referenced this issue Mar 21, 2019

cake-buildGH-2393: Second pass, attempt to more completely support co…
…degen

As a follow-on to the initial commit, this attempts to inspect
those parameters decorated with attributes that utilize a more
complex constructor signature, supporting typical constructor arguments
and named arguments.

This attempts to generally mimic the logic exposed in CustomAttributeTypedArgument,
but using the normal Cake code-gen reflection utils to emit compile-safe type names, etc.

@devlead devlead added this to the v0.33.0 milestone Mar 21, 2019

devlead added a commit that referenced this issue Mar 21, 2019

Merge branch 'kcamp-GH-2393' into develop
* kcamp-GH-2393:
  GetCallerInfo integration test
  GH-2393: Second pass, attempt to more completely support codegen
  GH-2393: First pass over supporting emitting parameter attributes
@devlead

This comment has been minimized.

Copy link
Member Author

commented Mar 21, 2019

Fixed by #2402

@devlead devlead closed this Mar 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.