Repository navigation
Issue 97 drop mdapi support - #366
Merged
Merged
Conversation
- Remove MDAPIWorkspaceConfig class and WorkspaceConfig trait - Simplify workspace creation to use SFDXProject directly - Require sfdx-project.json for all projects - Remove unused imports from Org.scala - Projects without sfdx-project.json now fail with clear error message This is the core implementation for issue #97 to drop MDAPI format support. Tests that rely on MDAPI format will need to be updated to use SFDX format.
- Refactor WorkspaceTest.scala for better maintainability:
* Replace chained .join() calls with helper methods
* Add comprehensive SFDX path building helpers
* Extract common XML patterns into reusable constants
* Simplify repetitive path assertion patterns
* All 42 tests still passing (100% success rate maintained)
- Add new WorkspaceTypeLookupTest.scala for missing coverage:
* Test Workspace.get(typeName) method functionality
* Multi-package directory type lookup behavior
* Custom Object lookup with Schema namespace
* Complex metadata hierarchy scenarios
* Event/get() consistency validation
* 8 comprehensive tests, all passing
Key insight: Custom Objects require Schema namespace for type lookup:
TypeName(Name("ObjectName__c"), Nil, Some(TypeName.Schema))
Coverage improvement: ~75% → ~85% for Workspace functionality
- Add ensureSFDXProject() method to automatically create sfdx-project.json when missing - Remove redundant withSFDXProject() helper method from WorkspaceTest - Update 39 tests to use FileSystemHelper auto-creation directly - Fix 3 Master/Detail tests to use withMultiPackageSFDXProject() for multi-package scenarios - Add comprehensive FileSystemHelperEnhancementTest covering auto-creation behavior - Simplify test authoring by eliminating boilerplate SFDX project setup
…tories - Update MetadataDocument to use case-insensitive matching for child directories (fields, fieldSets, sharingReasons) - Keep strict case enforcement for objects directory (SFDX requirement) - Add MetadataValidator warnings for incorrect case usage with helpful suggestions - Add comprehensive test coverage for case sensitivity scenarios in MetadataDocumentTest and MetadataValidatorTest - Improve user experience by recognizing files with incorrect case while guiding users to correct conventions - Ensure cross-platform compatibility and SFDX CLI compliance This resolves issues where metadata files in directories like "Fields" vs "fields" were not being recognized, while maintaining proper validation and user guidance for consistent project structure.
- Add ensureSFDXProject method to automatically create sfdx-project.json when missing on both JVM and JS platforms - Update WorkspaceTest to remove redundant withSFDXProject helper and fix multi-package tests - Add comprehensive FileSystemHelperEnhancementTest covering auto-creation scenarios - Apply scalafmt formatting across modified files for consistent code style - Update Workspace error message formatting - Enhance ParsedCache tests with better formatting This completes the FileSystemHelper enhancement work that enables tests to work with raw metadata files without requiring manual SFDX project setup, while maintaining proper validation for edge cases.
- Fix FileSystemHelperEnhancementTest assertion to expect "." path instead of "force-app" - Add sfdx-project.json to samples/mdapi-test directory for compatibility - Update PackageAPITest to include explicit sfdx-project.json in test subdirectory - Update CachedTest to include sfdx-project.json files for pkg1/pkg2 test scenarios - Fix DirectoryTreeTest to filter out auto-created sfdx-project.json from assertions - Fix ProjectTest to delete auto-created sfdx-project.json when testing missing file scenario All fixes address the transition from MDAPI support to SFDX-only format requirement. Total of 122 tests across 4 test classes now pass successfully.
Automatically create temporary sfdx-project.json files for samples that lack them. This allows sample tests to run successfully after dropping MDAPI support without modifying the actual sample repositories. Changes: - Enhanced findProjectDir() to detect existing sfdx-project.json files and create temporary ones when needed - Consolidated all sfdx-project.json handling logic into a single function - Added proper cleanup of temporary files after each test - Updated test snapshots to reflect new path formats
nawforce
commented
Aug 17, 2025
| @@ -0,0 +1,355 @@ | |||
| # Apex-LS Modularization Plan | |||
Contributor
Author
There was a problem hiding this comment.
This is something I had Claude draw up, was just wondering what 'better' might look like. It's not done a great job at understanding how the code splits between cross compiled and jvm only, but its maybe a start now this kind of reorg would be much cheaper for us to do.
nawforce
marked this pull request as ready for review
August 17, 2025 15:19
- Expose defaultSFDXProject from FileSystemHelper test utilities - Replace toLowerCase comparisons with equalsIgnoreCase() for consistency - Add explanatory comment for SFDXProject error logging consistency - Consolidate documentation files into .claude directories - Update test files to use shared defaultSFDXProject constant This addresses all feedback from PR #366 review comments.
nawforce
commented
Sep 2, 2025
| @@ -0,0 +1,155 @@ | |||
| # CLAUDE.md | |||
Contributor
Author
There was a problem hiding this comment.
I messed these up on an earlier PR so just resetting
Resolved conflict in test snapshot file by accepting main branch changes which include new test modifier validation rules.
The snapshot now correctly reflects both the branch changes (removing MDAPI-only samples) and the new test modifier validation rules from main.
The snapshots now correctly include the new test modifier validation errors from main branch for samples that have test methods without proper @istest class annotations.
pwrightcertinia
approved these changes
Sep 5, 2025
kjonescertinia
added a commit
that referenced
this pull request
Sep 20, 2025
- Add test modifier validation (#333) - Add break/continue statement validation (#378) - Add ForceIgnore version configuration (#371) - Add ForceIgnoreV2 improvements (#369) - Add interface method overload validation (#368) - Document MDAPI workspace support removal (#366) - Include library project enhancements and fixes
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Removes MDAPI format support and enforces SFDX-only project structure, improving code consistency and reducing maintenance complexity. Includes comprehensive test fixes to ensure compatibility with the new SFDX-only requirement.
Core Changes
SFDX-Only Requirement:
Case Sensitivity Validation:
Test Infrastructure Improvements
FileSystemHelper Enhancements:
"path": "."for test compatibilityComprehensive Test Fixes (122 tests across 4 classes):
Sample Directory Updates
Benefits
Migration Impact