hyperstack icon indicating copy to clipboard operation
hyperstack copied to clipboard

Operation's steps are duplicated after the Operation class has been reloaded

Open kvechera opened this issue 5 years ago • 1 comments

Operation classes after reloading in the browser keep previously defined steps.

Example: I started from a file with the following code:

class TestOperation < Hyperstack::Operation
	step { puts "#{self} first step" }
end

and after the execution of the TestOperation.run I got:

#<TestOperation:0xab78> first step

Then I update the file having changed the step:

class TestOperation < Hyperstack::Operation
	step { puts "#{self} new first step" }
end

and after the hotloader reloaded the file I executed TestOperation.run and got:

#<TestOperation:0xb0a6> first step
#<TestOperation:0xb0a6> new first step

while expected output should contain only the second line

#<TestOperation:0xb0a6> new first step

Hyperstack: branch [c0f18b0] / 1.0.alpha1.5. Opal: 0.11.4 Browsers: Firefox 66.0.3 (64-bit), Chrome 79.0.3945.130 (Official Build) (64-bit)

kvechera avatar Mar 12 '20 19:03 kvechera

Good catch. Thanks... for posting

catmando avatar Mar 18 '20 20:03 catmando