-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Improved fully qualified references to code in the Schema and System namespaces #712
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jongpie
added
Type: Bug
Something isn't working
Layer: Configuration
Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type
Layer: Log Management
Items related to the custom objects & Logger Console app
Layer: Logger Engine
Items related to the core logging engine
Package Type: Unlocked Package
Issues and enhancements that specifically apply to the unlocked package
labels
Jul 10, 2024
jongpie
had a problem deploying
to
Base Scratch Org
July 10, 2024 17:36
— with
GitHub Actions
Failure
jongpie
had a problem deploying
to
Experience Cloud Scratch Org
July 10, 2024 17:36
— with
GitHub Actions
Failure
jongpie
temporarily deployed
to
Experience Cloud Scratch Org
July 10, 2024 17:51
— with
GitHub Actions
Inactive
jongpie
force-pushed
the
feature/improved-fully-qualified-references
branch
from
July 10, 2024 19:17
f0fbf09
to
7ae0758
Compare
jongpie
temporarily deployed
to
Experience Cloud Scratch Org
July 10, 2024 19:22
— with
GitHub Actions
Inactive
…em.EventBus, and System.UUID Also fixed some flaky tests in LogBatchPurgeController_Tests
…ema.ApexTrigger, and Schema.ApexEmailNotification
…ystem.RestRequest, and System.RestResponse
There's just so many of them now!
…View, Schema.FlowVersionView, and Schema.UserRecordAccess
…stem.InstallHandler, System.JSON, System.Queueable, System.QueueableContext, System.Quiddity, System.Request, System.Schedulable, System.SchedulableContext, System.Search, and System.TriggerOperation
…ystem.PicklistEntry, and Schema.SoapType
…Schema.BatchApexErrorEvent, Schema.CustomPermission, Schema.FlowExecutionErrorEvent, Schema.PermissionSet, Schema.PermissionSetAssignment, Schema.UserRole, System.BatchableContext, and System.FinalizerContext
jongpie
force-pushed
the
feature/improved-fully-qualified-references
branch
from
July 10, 2024 20:59
7ae0758
to
ebd342a
Compare
jongpie
temporarily deployed
to
Experience Cloud Scratch Org
July 10, 2024 21:03
— with
GitHub Actions
Inactive
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #712 +/- ##
==========================================
- Coverage 95.67% 95.66% -0.02%
==========================================
Files 50 50
Lines 5597 5604 +7
==========================================
+ Hits 5355 5361 +6
- Misses 242 243 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Layer: Configuration
Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type
Layer: Log Management
Items related to the custom objects & Logger Console app
Layer: Logger Engine
Items related to the core logging engine
Package Type: Unlocked Package
Issues and enhancements that specifically apply to the unlocked package
Type: Bug
Something isn't working
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the unlocked package does not have a namespace, orgs can encounter installation errors for Nebula Logger if the target org has any custom Apex code (classes, enums, interfaces, etc.) with the same name as standard class in the
Schema
orSystem
namespace (referred to as name shadowing).This is the same concept & approach as the changes made in several previous releases (listed below) - but my hope is that this PR finally finishes this effort, and all references are now fully qualified.
v4.9.0
v4.9.4
v4.9.6
v4.12.5
This shouldn't cause any functional changes to Nebula Logger - this is to tidy up existing references to avoid name collisions so that more orgs can use the unlocked package.
Metadata Changes
Moved the existing name-shadowing classes in the
extra-tests
directory to be in separate subdirectories (one for each namespace,Schema
andSystem
)Added name-shadowing classes for several standard classes in the
Schema
andSystem
namespaces & switched to using fully-qualified references for these classes:Schema
namespace standard classesApexClass
→Schema.ApexClass
ApexEmailNotification
→Schema.ApexEmailNotification
ApexTrigger
→Schema.ApexTrigger
AsyncApexJob
→Schema.AsyncApexJob
BatchApexErrorEvent
→Schema.BatchApexErrorEvent
CustomPermission
→Schema.CustomPermission
DisplayType
→Schema.DisplayType
FlowDefinitionView
→Schema.FlowDefinitionView
FlowExecutionErrorEvent
→Schema.FlowExecutionErrorEvent
FlowVersionView
→Schema.FlowVersionView
PermissionSet
→Schema.PermissionSet
PermissionSetAssignment
→Schema.PermissionSetAssignment
SoapType
→Schema.SoapType
UserRecordAccess
→Schema.UserRecordAccess
UserRole
→Schema.UserRole
System
namespace standard classesBatchableContext
→System.BatchableContext
Comparable
→System.Comparable
Database
→System.Database
EventBus
→System.EventBus
FinalizerContext
→System.FinalizerContext
InstallHandler
→System.InstallHandler
JSON
→System.JSON
Matcher
→System.Matcher
Pattern
→System.Pattern
PicklistEntry
→System.PicklistEntry
Queueable
→System.Queueable
QueueableContext
→System.QueueableContext
Quiddity
→System.Quiddity
Request
→System.Request
RestContext
→System.RestContext
RestRequest
→System.RestRequest
RestResponse
→System.RestResponse
Schedulable
→System.Schedulable
SchedulableContext
→System.SchedulableContext
Search
→System.Search
TriggerOperation
→System.TriggerOperation
UUID
→System.UUID
Scope creep: fixed some flaky tests in
LogBatchPurgeController_Tests