Comments (18)
Interesting idea. I guess we could add support for something like #failOnWarnings
to SCIMetacelloLoadSpec
and then you could enable it by setting the value to True
.
I wonder what @dalehenrich thinks about this.
BTW: I literally just made smalltalkCI ignore warnings (0a1f772) π .
from smalltalkci.
My thoughts are that we'd like to fail on specific warnings rather than generic warnings ... @DamienCassou could you supply a stack that shows an example of the Warning you want ignored? If this is coming from Metacello, I'd be willing to create a specific class so that we can selectively fail ...
from smalltalkci.
I have the impression the warning comes from the compiler, in particular the Encoder>>undeclared:
which signals an UndeclaredVariableWarning. This exception can be resumed. In Pharo, when Monticello loads a package containing a method with a reference to a non existing class, a message is shown in the transcript and loading continues. In my example, I have a package Foo-Main
with a class FooMain
with a method foo
referencing a class in another package. If this dependency is not loaded, loading Foo-Main
results in the following being shown in the transcript:
FooMain>>foo (FooDependency is Undeclared)
from smalltalkci.
Metacello, in MetacelloMCVersionValidator>>validateCleanLoadAndTestsForVersion:loads:
has code related to this exception as well.
from smalltalkci.
As I think about the UndeclaredVariableWarning, I'm pretty sure that the Warning can be thrown in cases where the global will be resolved by another package being loaded a bit later during the same project load ... so it is not fool proof ...
I deal with this in GemStone by having a test that detects sent but no implemented methods
and undeclared globals
...
from smalltalkci.
Marcus told me the class Encoder is not used anymore, it's the old compiler. What is important now is that the new compiler signals OCUndeclaredVariableWarning
when a method references an undeclared variable. I would like the code loader to signal an error if this warning is signaled. Is that possible?
from smalltalkci.
@dalehenrich you are right. But this warning typically indicates a bad dependency: if my packages and configuration are correct, there should not be any undeclared variable at any point of the loading process; Metacello should load packages in the right order. If there is an undeclared variable at any point, it means the configuration is incorrect (a dependency is not yet loaded) or there are circular dependencies. I would like the build to break so that I know I have a problem somewhere.
from smalltalkci.
@DamienCassou you are correct that it is a "bad dependency", but as you are aware, the universe is full of projects with bad dependencies that end up loading correctly...
Given that you have a specific exception to be caught, perhaps it makes sense to allow one to specify a list of Notifications that will cause a build to fail:
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#failLoadOn : [ 'OCUndeclaredVariableWarning' ],
#baseline : 'MyProject',
#directory : 'packages',
#platforms : [ #squeak, #pharo, #gemstone ]
}
]
}
from smalltalkci.
@DamienCassou you are correct that it is a "bad dependency", but as you are aware, the universe is full of projects with bad dependencies that end up loading correctly...
I agree, that's why I'm not proposing to fail all builds because of that. But I want my packages to be free of such problems. i think your proposal makes sense.
from smalltalkci.
@fniephaus what do you think of #failLoadOn
... I could take this on if you'd like ... it's related to the #onWarningLog
option ...
from smalltalkci.
Please do! This is an open source project and everyone is invited to contribute ;)
from smalltalkci.
π for having this option
from smalltalkci.
Does Metacello already have something similar to #failLoadOn
or would you just catch the user-provided warnings manually and fail the build?
from smalltalkci.
No ... I was thinking that SmalltalkCI would need to handle that ...
from smalltalkci.
Thanks for the info, so we'd need to do this manually in SCIMetacelloLoadSpec>>basicLoadProjectOn:
.
from smalltalkci.
@dalehenrich what do you think about this?
from smalltalkci.
@fniephaus I think I would like a stack or at least an error message stating why the build failed.
from smalltalkci.
Ups, good point...
from smalltalkci.
Related Issues (20)
- Add Rowan v2 support to smalltalkCI HOT 1
- Failing jobs for Pharo32-xx (Linux, MacOs and Windows) HOT 4
- Exit status canβt be used to distinguish between tests not passing and other errors HOT 3
- Update GitHub action HOT 3
- Question: How to use Windows OS with GitLab ? HOT 2
- GemStone github action runs fail on mac-os for 3.7.0 HOT 1
- [Question] How to configure merge request trigger on a GitLab server ? HOT 2
- Cannot execute extensions tag unit tests HOT 5
- Please release upgraded Squeak Trunk images to resolve conflict in update stream HOT 1
- [Bug] Error when load in new image on Windows: curl failed to download get.pharo.org/64/vm110 HOT 8
- `PackageOrganizer>>#listAtCategoryNamed:` deprecated in Pharo 12 HOT 3
- Pharo12-alpha broke Metacello HOT 1
- Metacello broken again for Pharo 12 HOT 4
- Pharo12 builds fail because they removed Time>>millisecondsToRun: HOT 2
- Unable to parse Coveralls build data HOT 11
- Github actions warning: node16 actions are deprecated HOT 1
- [Question] Is it sensible to rely on SmalltalkCI code for an asdf plugin? HOT 5
- SmalltalkCI class>>saveAndQuitImage currently broken in Pharo-11.0.0+build.725 HOT 13
- Compatibility package for Pharo HOT 1
- FFIUnsupportedUntypedLiteral error in Pharo 12 on MacOS & Windows HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smalltalkci.