CodeExporter doesn't

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

CodeExporter doesn't

alistairgrant
Hi Everyone,

Attempting to file out changes from the Change Sorter results in an
'Improper store into indexable object'.  (To reproduce this, right click
on any change set and choose "File out").

I believe the root cause of the problem is:

CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: aFileReference

aFileReference writeStreamDo: [ :outputStream |
(ZnCrPortableWriteStream on: (ZnCharacterWriteStream
on: outputStream
encoding: 'utf8')) nextPutAll: aStream contents.
].

self inform: 'Filed out to: ', String cr, aFileReference basename


ZnCrPortableWriteStream expects a binary stream and is being given a
multi-byte file stream.

The obvious solution is to add FileReference>>binaryWriteStreamDo: and
associated methods.

Can someone who is more familiar with the Zinc package confirm that my
understanding is correct?

Fogbugz: https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore


Thanks!
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: CodeExporter doesn't

alistairgrant
On 21 February 2018 at 11:43, Alistair Grant <[hidden email]> wrote:

> Hi Everyone,
>
> Attempting to file out changes from the Change Sorter results in an
> 'Improper store into indexable object'.  (To reproduce this, right click
> on any change set and choose "File out").
>
> I believe the root cause of the problem is:
>
> CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: aFileReference
>
> aFileReference writeStreamDo: [ :outputStream |
> (ZnCrPortableWriteStream on: (ZnCharacterWriteStream
> on: outputStream
> encoding: 'utf8')) nextPutAll: aStream contents.
> ].
>
> self inform: 'Filed out to: ', String cr, aFileReference basename
>
>
> ZnCrPortableWriteStream expects a binary stream and is being given a
> multi-byte file stream.
>
> The obvious solution is to add FileReference>>binaryWriteStreamDo: and
> associated methods.
>
> Can someone who is more familiar with the Zinc package confirm that my
> understanding is correct?
>
> Fogbugz: https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore

And if I'd bothered to read the class comments before posting, I
wouldn't have wasted everyone's time.

Using a binary write stream is the answer, according to the class comments.


Sorry,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: CodeExporter doesn't

Stephane Ducasse-3
Hi alistair

So is this fixed? Because I got bitten by it but no time even to think about it.

Stef

On Wed, Feb 21, 2018 at 12:37 PM, Alistair Grant <[hidden email]> wrote:

> On 21 February 2018 at 11:43, Alistair Grant <[hidden email]> wrote:
>> Hi Everyone,
>>
>> Attempting to file out changes from the Change Sorter results in an
>> 'Improper store into indexable object'.  (To reproduce this, right click
>> on any change set and choose "File out").
>>
>> I believe the root cause of the problem is:
>>
>> CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: aFileReference
>>
>> aFileReference writeStreamDo: [ :outputStream |
>> (ZnCrPortableWriteStream on: (ZnCharacterWriteStream
>> on: outputStream
>> encoding: 'utf8')) nextPutAll: aStream contents.
>> ].
>>
>> self inform: 'Filed out to: ', String cr, aFileReference basename
>>
>>
>> ZnCrPortableWriteStream expects a binary stream and is being given a
>> multi-byte file stream.
>>
>> The obvious solution is to add FileReference>>binaryWriteStreamDo: and
>> associated methods.
>>
>> Can someone who is more familiar with the Zinc package confirm that my
>> understanding is correct?
>>
>> Fogbugz: https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
>
> And if I'd bothered to read the class comments before posting, I
> wouldn't have wasted everyone's time.
>
> Using a binary write stream is the answer, according to the class comments.
>
>
> Sorry,
> Alistair
>

Reply | Threaded
Open this post in threaded view
|

Re: CodeExporter doesn't

alistairgrant
Hi Stef,

On 21 February 2018 at 21:35, Stephane Ducasse <[hidden email]> wrote:
> Hi alistair
>
> So is this fixed? Because I got bitten by it but no time even to think about it.

- PR submitted: https://github.com/pharo-project/pharo/pull/923
- Fogbugz resolved, review needed:
https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
- CI passed all tests:
https://ci.inria.fr/pharo-ci-jenkins2/blue/organizations/jenkins/Test%20pending%20pull%20request%20and%20branch%20Pipeline/detail/PR-923/1/pipeline

Hopefully someone agrees to merge it in. :-)

Cheers,
Alistair




> Stef
>
> On Wed, Feb 21, 2018 at 12:37 PM, Alistair Grant <[hidden email]> wrote:
>> On 21 February 2018 at 11:43, Alistair Grant <[hidden email]> wrote:
>>> Hi Everyone,
>>>
>>> Attempting to file out changes from the Change Sorter results in an
>>> 'Improper store into indexable object'.  (To reproduce this, right click
>>> on any change set and choose "File out").
>>>
>>> I believe the root cause of the problem is:
>>>
>>> CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: aFileReference
>>>
>>> aFileReference writeStreamDo: [ :outputStream |
>>> (ZnCrPortableWriteStream on: (ZnCharacterWriteStream
>>> on: outputStream
>>> encoding: 'utf8')) nextPutAll: aStream contents.
>>> ].
>>>
>>> self inform: 'Filed out to: ', String cr, aFileReference basename
>>>
>>>
>>> ZnCrPortableWriteStream expects a binary stream and is being given a
>>> multi-byte file stream.
>>>
>>> The obvious solution is to add FileReference>>binaryWriteStreamDo: and
>>> associated methods.
>>>
>>> Can someone who is more familiar with the Zinc package confirm that my
>>> understanding is correct?
>>>
>>> Fogbugz: https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
>>
>> And if I'd bothered to read the class comments before posting, I
>> wouldn't have wasted everyone's time.
>>
>> Using a binary write stream is the answer, according to the class comments.
>>
>>
>> Sorry,
>> Alistair
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: CodeExporter doesn't

Stephane Ducasse-3
Thanks ***a lot***

On Wed, Feb 21, 2018 at 9:48 PM, Alistair Grant <[hidden email]> wrote:

> Hi Stef,
>
> On 21 February 2018 at 21:35, Stephane Ducasse <[hidden email]> wrote:
>> Hi alistair
>>
>> So is this fixed? Because I got bitten by it but no time even to think about it.
>
> - PR submitted: https://github.com/pharo-project/pharo/pull/923
> - Fogbugz resolved, review needed:
> https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
> - CI passed all tests:
> https://ci.inria.fr/pharo-ci-jenkins2/blue/organizations/jenkins/Test%20pending%20pull%20request%20and%20branch%20Pipeline/detail/PR-923/1/pipeline
>
> Hopefully someone agrees to merge it in. :-)
>
> Cheers,
> Alistair
>
>
>
>
>> Stef
>>
>> On Wed, Feb 21, 2018 at 12:37 PM, Alistair Grant <[hidden email]> wrote:
>>> On 21 February 2018 at 11:43, Alistair Grant <[hidden email]> wrote:
>>>> Hi Everyone,
>>>>
>>>> Attempting to file out changes from the Change Sorter results in an
>>>> 'Improper store into indexable object'.  (To reproduce this, right click
>>>> on any change set and choose "File out").
>>>>
>>>> I believe the root cause of the problem is:
>>>>
>>>> CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: aFileReference
>>>>
>>>> aFileReference writeStreamDo: [ :outputStream |
>>>> (ZnCrPortableWriteStream on: (ZnCharacterWriteStream
>>>> on: outputStream
>>>> encoding: 'utf8')) nextPutAll: aStream contents.
>>>> ].
>>>>
>>>> self inform: 'Filed out to: ', String cr, aFileReference basename
>>>>
>>>>
>>>> ZnCrPortableWriteStream expects a binary stream and is being given a
>>>> multi-byte file stream.
>>>>
>>>> The obvious solution is to add FileReference>>binaryWriteStreamDo: and
>>>> associated methods.
>>>>
>>>> Can someone who is more familiar with the Zinc package confirm that my
>>>> understanding is correct?
>>>>
>>>> Fogbugz: https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
>>>
>>> And if I'd bothered to read the class comments before posting, I
>>> wouldn't have wasted everyone's time.
>>>
>>> Using a binary write stream is the answer, according to the class comments.
>>>
>>>
>>> Sorry,
>>> Alistair
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: CodeExporter doesn't

Stephane Ducasse-3
Integrated!

On Thu, Feb 22, 2018 at 7:20 AM, Stephane Ducasse
<[hidden email]> wrote:

> Thanks ***a lot***
>
> On Wed, Feb 21, 2018 at 9:48 PM, Alistair Grant <[hidden email]> wrote:
>> Hi Stef,
>>
>> On 21 February 2018 at 21:35, Stephane Ducasse <[hidden email]> wrote:
>>> Hi alistair
>>>
>>> So is this fixed? Because I got bitten by it but no time even to think about it.
>>
>> - PR submitted: https://github.com/pharo-project/pharo/pull/923
>> - Fogbugz resolved, review needed:
>> https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
>> - CI passed all tests:
>> https://ci.inria.fr/pharo-ci-jenkins2/blue/organizations/jenkins/Test%20pending%20pull%20request%20and%20branch%20Pipeline/detail/PR-923/1/pipeline
>>
>> Hopefully someone agrees to merge it in. :-)
>>
>> Cheers,
>> Alistair
>>
>>
>>
>>
>>> Stef
>>>
>>> On Wed, Feb 21, 2018 at 12:37 PM, Alistair Grant <[hidden email]> wrote:
>>>> On 21 February 2018 at 11:43, Alistair Grant <[hidden email]> wrote:
>>>>> Hi Everyone,
>>>>>
>>>>> Attempting to file out changes from the Change Sorter results in an
>>>>> 'Improper store into indexable object'.  (To reproduce this, right click
>>>>> on any change set and choose "File out").
>>>>>
>>>>> I believe the root cause of the problem is:
>>>>>
>>>>> CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: aFileReference
>>>>>
>>>>> aFileReference writeStreamDo: [ :outputStream |
>>>>> (ZnCrPortableWriteStream on: (ZnCharacterWriteStream
>>>>> on: outputStream
>>>>> encoding: 'utf8')) nextPutAll: aStream contents.
>>>>> ].
>>>>>
>>>>> self inform: 'Filed out to: ', String cr, aFileReference basename
>>>>>
>>>>>
>>>>> ZnCrPortableWriteStream expects a binary stream and is being given a
>>>>> multi-byte file stream.
>>>>>
>>>>> The obvious solution is to add FileReference>>binaryWriteStreamDo: and
>>>>> associated methods.
>>>>>
>>>>> Can someone who is more familiar with the Zinc package confirm that my
>>>>> understanding is correct?
>>>>>
>>>>> Fogbugz: https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
>>>>
>>>> And if I'd bothered to read the class comments before posting, I
>>>> wouldn't have wasted everyone's time.
>>>>
>>>> Using a binary write stream is the answer, according to the class comments.
>>>>
>>>>
>>>> Sorry,
>>>> Alistair
>>>>
>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: CodeExporter doesn't

alistairgrant
On 22 February 2018 at 07:50, Stephane Ducasse <[hidden email]> wrote:
> Integrated!

Thanks!


> On Thu, Feb 22, 2018 at 7:20 AM, Stephane Ducasse
> <[hidden email]> wrote:
>> Thanks ***a lot***
>>
>> On Wed, Feb 21, 2018 at 9:48 PM, Alistair Grant <[hidden email]> wrote:
>>> Hi Stef,
>>>
>>> On 21 February 2018 at 21:35, Stephane Ducasse <[hidden email]> wrote:
>>>> Hi alistair
>>>>
>>>> So is this fixed? Because I got bitten by it but no time even to think about it.
>>>
>>> - PR submitted: https://github.com/pharo-project/pharo/pull/923
>>> - Fogbugz resolved, review needed:
>>> https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
>>> - CI passed all tests:
>>> https://ci.inria.fr/pharo-ci-jenkins2/blue/organizations/jenkins/Test%20pending%20pull%20request%20and%20branch%20Pipeline/detail/PR-923/1/pipeline
>>>
>>> Hopefully someone agrees to merge it in. :-)
>>>
>>> Cheers,
>>> Alistair
>>>
>>>
>>>
>>>
>>>> Stef
>>>>
>>>> On Wed, Feb 21, 2018 at 12:37 PM, Alistair Grant <[hidden email]> wrote:
>>>>> On 21 February 2018 at 11:43, Alistair Grant <[hidden email]> wrote:
>>>>>> Hi Everyone,
>>>>>>
>>>>>> Attempting to file out changes from the Change Sorter results in an
>>>>>> 'Improper store into indexable object'.  (To reproduce this, right click
>>>>>> on any change set and choose "File out").
>>>>>>
>>>>>> I believe the root cause of the problem is:
>>>>>>
>>>>>> CodeExporter class>>writeSourceCodeFrom: aStream toFileReference: aFileReference
>>>>>>
>>>>>> aFileReference writeStreamDo: [ :outputStream |
>>>>>> (ZnCrPortableWriteStream on: (ZnCharacterWriteStream
>>>>>> on: outputStream
>>>>>> encoding: 'utf8')) nextPutAll: aStream contents.
>>>>>> ].
>>>>>>
>>>>>> self inform: 'Filed out to: ', String cr, aFileReference basename
>>>>>>
>>>>>>
>>>>>> ZnCrPortableWriteStream expects a binary stream and is being given a
>>>>>> multi-byte file stream.
>>>>>>
>>>>>> The obvious solution is to add FileReference>>binaryWriteStreamDo: and
>>>>>> associated methods.
>>>>>>
>>>>>> Can someone who is more familiar with the Zinc package confirm that my
>>>>>> understanding is correct?
>>>>>>
>>>>>> Fogbugz: https://pharo.fogbugz.com/f/cases/21381/CodeExporter-triggers-errorImproperStore
>>>>>
>>>>> And if I'd bothered to read the class comments before posting, I
>>>>> wouldn't have wasted everyone's time.
>>>>>
>>>>> Using a binary write stream is the answer, according to the class comments.
>>>>>
>>>>>
>>>>> Sorry,
>>>>> Alistair
>>>>>
>>>>
>>>
>