-
Notifications
You must be signed in to change notification settings - Fork 8
Compile items after Import All #368
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
Compile items after Import All #368
Conversation
Please make this configurable. The codebase I work with requires some classes to be compiled in a particular order on first import for reasons that are not practical to address in the short term. I am concerned that this will cause problems for us. |
@isc-pbarton the point @raymond-rebbeck raises is fair - let's make this configurable, but we want to default to compiling (particularly for the sake of less-technical interop users who wouldn't necessarily understand the implications). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two points here: configurability is needed (defaulting to compile but should be able to turn it off), and we should compile everything after loading everything rather than compiling each thing as it's loaded.
cls/SourceControl/Git/Utils.cls
Outdated
@@ -1230,7 +1230,7 @@ ClassMethod ImportItem(InternalName As %String, force As %Boolean = 0, verbose A | |||
if ($extract(InternalName, 1) = "/"){ | |||
set sc = ..ImportCSPFile(InternalName) | |||
} else{ | |||
set sc = $system.OBJ.Load(filename,"-l-d") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that we were using -l - I wonder if there was a reason for this. I agree that displaying output is reasonable, for sure.
Question - what's the behavior if a single item fails to load/compile?
A better architecture here would be to maintain a list of things that were loaded by specific calls to ImportItem and then compile all of them at the same time after all have been loaded. As written this is likely to hit dependencies (especially on initial load); with compilation at the end it at least should be possible for a developer to fix compilation dependencies with the right values for System, CompileAfter, DependsOn, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note from discussion today: just use PullEventHandler
…t-source-control into compile-on-import
This reverts commit 9718793.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Fixes #362