Jira (PUP-4815) Enable migration to new scope implementation in 3.x functions and ERB

2 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Jul 2, 2015, 10:06:11 AM7/2/15
to puppe...@googlegroups.com
Henrik Lindberg created an issue
 
Puppet / Improvement PUP-4815
Enable migration to new scope implementation in 3.x functions and ERB
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2015/07/02 7:05 AM
Fix Versions: PUP 4.3.0
Priority: Normal Normal
Reporter: Henrik Lindberg

We have a desire to make a faster and cleaner implementation of Scope. The current (3.x scope) implementation acts very much as a router for all kinds of functionality and it acts as self in 3.x function implementations and ERB templates.

In order to enable migration, the 3.x function implementation and ERB wrapper implementation must change so that self is class (Scope3xCompatibility) that responds to the same public methods as Scope and delegates those to a 3.x Scope that it has a reference to. There should probably be subclasses specific to 3.x functions and ERB.

All methods that are considered private should issue a deprecation warning. Methods considered public should not, unless there are methods we absolutely have to block. The reason for not deprecating everything is that the 3.x functions eventually will be deprecated and removed along with the ERB support.

Deprecation messaging should suggest moving to the 4.x APIs instead of just patching the 3.x implementation.

We would really like to single out implementations that are based on access to the calling scope or those that modify the contents of either calling or closure scope. Unfortunately, any variable lookup is subject to be different depending on which scope is being used - all current usage expect calling scope. One way to enforce this is to require that implementations make a distinction and call either closure_scope or calling_scope - after that it is possible to single out those that use calling_scope. Such a change will however most likely be just as unpopular as forcing users to change to the 4.x APIs and EPP. For these reasons, we should keep the deprecations and required changes to a minimum while making it possible to supply a better scope implementation.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Oct 19, 2015, 5:57:03 PM10/19/15
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Fix Version/s: PUP 4.x
This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Sep 7, 2016, 6:13:28 PM9/7/16
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Team: Puppet Developer Support
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Apr 25, 2017, 6:04:02 AM4/25/17
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Fix Version/s: PUP 4.y
Fix Version/s: PUP 5.y

Henrik Lindberg (JIRA)

unread,
May 15, 2017, 3:37:04 PM5/15/17
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 2, 2021, 8:26:03 PM6/2/21
to puppe...@googlegroups.com
Josh Cooper commented on Improvement PUP-4815
 
Re: Enable migration to new scope implementation in 3.x functions and ERB

We have no plans on making breaking changes to the language, so I'm going to close this due to inactivity.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages