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

printOn: a WAUrlEncoder can get interesting when no WACurrentContext on stack #69

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link


1. put a halt in WAUrlTest>>testParseAmbiguous as follows:
testParseAmbigous
    self ambigousExamples do: [ :each |
        self 
            assert: (WAUrl halt absolute: each first) toString = each last
            description: each last resumable: true ]

2. run the test and step into WAUrl>>initializeFromString:
3. After stepping over 'self initialize', select self and you'll get an
error, because there is no WACurrentRequest on the stack .... '<error in
printString: evaluate "self printString" to debug>'...

Presumably the folks that use WACurrentRequest to get values should do nil
checks to avoid getting such errors ... 


Original issue reported on code.google.com by [email protected] on 19 May 2008 at 11:08

@GoogleCodeExporter
Copy link
Author

The issue is probably in WAUrlEncoder >> #initializeOn:table: . The question is 
what
do we do if we know that there is no request context. Either raise an error or 
use a
NullCodec. I'd rather raise an error.

Original comment by [email protected] on 31 May 2008 at 12:26

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Ah, just stumbled across this bug. I'd rather use a NullCodec otherwise doing
development just seems painful. In fact, I already committed this change in:

---------------
Name: Seaside-Core-jf.183
Author: jf
Time: 29 July 2008, 12:25:59 pm
UUID: 7dc4db18-c648-cd4d-81c8-5c485b9a3d0f
Ancestors: Seaside-Core-jf.182

Have WAUrlEncoder use a null codec if it can't find any other in the request 
context.
------------------

As per our discussion on the list, though, this introduces a dependency the 
wrong way
with Seaside-Adapters-Core. So either we pull WANullCodec and WACodec into core 
or we
implement WAUrl>>printOn: so it doesn't need a codec and does an approximation 
the
dev tools can use and WAUrl>>toString so it uses the original codec 
implementation.

Or we decide it doesn't matter that you can't easily work with WAUrl objects in 
the
debugger/inspector... seems a shame though.

Original comment by [email protected] on 5 Aug 2008 at 2:04

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Preventing an error during printOn: would be the first order of business, being 
able
to get a meaningful printString during debugging/inspecting is secondary, but 
still
pretty useful ... as it is you have to inspect the WAUrl and reconstruct the url
string from it's pieces, so a null codec would be more useful than not ... 
another
argument for including a codec in the core

Original comment by [email protected] on 5 Aug 2008 at 4:07

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Ok, you guys convinced me.

Original comment by [email protected] on 5 Aug 2008 at 5:10

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Ok, WACodec is in core now. Seaside-Adapters-Core, Seaside-Adapters-Squeak and
Seaside-Adapters-Test are all no more. Same goes for WAGenericCodec.
SeasidePlatformSupport >> #utf8Codec has been replaced with #genericCodedClass.

Name: Seaside-Core-pmm.184
Author: pmm
Time: 5 August 2008, 11:04:09 pm
UUID: 725e41b4-a0ad-4dbd-b45a-0a46cc4f6ca2
Ancestors: Seaside-Core-jf.183

- moved WACoded to Seaside-Core

Name: Seaside-Squeak-Core-pmm.52
Author: pmm
Time: 5 August 2008, 11:04:41 pm
UUID: bfddc629-387d-4b23-997e-ce8ad626c871
Ancestors: Seaside-Squeak-Core-jf.51

- moved WACoded to Seaside-Core

Name: Seaside-Squeak-Tests-pmm.7
Author: pmm
Time: 5 August 2008, 11:05:02 pm
UUID: dcf7a200-2493-4fbd-8a9d-349d8b1dc5b9
Ancestors: Seaside-Squeak-Tests-pmm.6

- moved WACoded to Seaside-Core

Name: Scriptaculous-Tests-pmm.47
Author: pmm
Time: 5 August 2008, 11:05:23 pm
UUID: 39049980-e33f-40dd-99a5-402b432f4b8f
Ancestors: Scriptaculous-Tests-obi.46

- moved WACoded to Seaside-Core

Name: RSS-Tests-pmm.3
Author: pmm
Time: 5 August 2008, 11:05:48 pm
UUID: 943438b1-271b-4fc5-b6a9-e4eefe8aff74
Ancestors: RSS-Tests-pmm.2

- moved WACoded to Seaside-Core

Original comment by [email protected] on 5 Aug 2008 at 9:09

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

This change has introduced a wrong way dependency from Seaside-Squeak-Core to 
Seaside-Core (since WAGenericSqueakCodec and WAUtf8SqueakCodec subclass WACodec.

Original comment by [email protected] on 29 Aug 2008 at 1:53

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

I moved the continuation to its own package. The new load order is now supposed 
to be:

1. Seaside-Squeak-Continuation
2. Seaside-Core
3. Seaside-Squeak-core

That should work withhout any undeclareds or circular dependencies. 

Original comment by [email protected] on 30 Aug 2008 at 9:51

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Seems fixed. John, can you verify and reopen if necessary?

Original comment by [email protected] on 30 Aug 2008 at 5:39

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

dalehenrich pushed a commit to dalehenrich/Seaside that referenced this issue Sep 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant