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

Allow standard field declarations in gulped modules #155

Conversation

nawforce
Copy link
Contributor

No description provided.

@nawforce
Copy link
Contributor Author

nawforce commented Apr 23, 2023

This allows gulped modules to declare standard fields on standard and custom objects. It started as a way to eventually support person accounts which have additional fields by allowing them to be added to gulp modules. Later I am expecting we can enhance metdata-gulp to auto download standard fields to better handle different org shapes.

Along the way I ran into an old problem where we only record isGulped against packages and this is not granular enough to handle say unmanaged gulp modules alongside unmanaged code. To resolve I have moved the isGulped flag down one level to modules. This should have a nice side effect in that you should now be able to use a mix of gulped & local metadata that use the same namespace when doing package development.

I need to do some more manual testing on this to make sure there are no gotchas.

pwrightcertinia
pwrightcertinia previously approved these changes May 2, 2023
@nawforce
Copy link
Contributor Author

nawforce commented Jun 26, 2023

@bmathewcertinia Could you take a look at the last commit on here. I have moved the isGulped flag from packages to modules and that got my some build issues with your changes in this area. I have attempted to resolve after reading https://github.com/apex-dev-tools/tooling-issues/issues/5 but just want to make sure I am understanding correctly. From looking at the changes it appears that we want dependent package metadata included for OPM.getDependencyCounts() but not for OPM.getDependencyGraph().

I am using the term 'dependent package' here to avoid thinking about if a module in the package is gulped or not. So for example, if we are just using unmanaged we may now mix some metadata we download with some we develop locally. In which case dependency counts and the graph really evaluate over both. Alternatively we could download some managed metadata and develop either unmanaged or managed metadata over that but in that case counts would include the downloaded and the graph would not.

…dules-to-extend-standard-sobjects-with-additional-standard-fields
@bmathewcertinia
Copy link
Contributor

I think this is fine, so the original issue was the collector didn't have access to the gulped packages cause it was essentially filtered out IIRC. From the looks of this PR, it looks like some of thats ben handled elsewhere now so the modification in the last commit should be good

@nawforce nawforce changed the base branch from main to 206-scalafmt-is-messing-up-diffs-too-much July 6, 2023 16:10
Base automatically changed from 206-scalafmt-is-messing-up-diffs-too-much to main July 6, 2023 18:50
@nawforce nawforce changed the base branch from main to 208-lookup-fields-break-refresh August 21, 2023 20:12
Base automatically changed from 208-lookup-fields-break-refresh to main September 5, 2023 19:35
@kjonescertinia
Copy link
Contributor

I am going to close this, its a fairly large change and so risky and has gone stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow gulped modules to extend standard SObjects with additional standard fields
4 participants