ChangeLog
0.65.0 (2025-09-22)
Improvement
reblocks/actions:make-js-actionfunction now accepts as values a Parenscript code.
Such code will be rendred as string and passed to the fronted as raw Javasript, not as a string. This allows to execute arbitrary Javascript code to calculate action's argument right before the action execution.
0.64.2 (2025-06-08)
Improvement
Handle pathnames in responses. See commit: 425155b28b77 and Github issue: #83
0.64.1 (2025-05-27)
Fixed
Fixed the
Unknown type of result: REBLOCKS/WIDGETS/STRING-WIDGET:STRING-WIDGETerror, occured in Reblocks applications initialized old-way byinit-pagemethod.
Thanks for the report to Mariano Montone!
0.64.0 (2025-05-22)
Backward incompatible changes
Function
reblocks/utils/misc:relative-pathnow accepts the pathnames and returns a pathname instead of string.
New
A special method was added for Spinneret's
htmlgeneric-function. This method callsreblocks/widget:rendergeneric-function if you use a widget in the body of SpinneretHTMLtag.
0.63.0 (2025-05-17)
Class
reblocks/server::static-route-from-filewas renamed and now exported asreblocks/routes:static-file-routealong with a constructor functionreblocks/routes:static-file.
0.62.0 (2025-05-08)
This release contains many changes, but the main one is that now Reblocks uses 40ants-routes system to provide a native way to define routes for multipage applications. Previously you have to process routes manually or use reblocks-navigation-widget system.
Here are changes made in this release:
Class
reblocks/routes:routewas removed.Macro
reblocks/routes:defroutewas removed.Function
reblocks/routes:get-routewas removed.Generic-function
reblocks/request-handler:page-not-found-handlerwas removed. Nowreblocks/response:not-found-errorfunction should be used to show a widget for 404 page and this widget will be wraped by funcallable application's slotreblocks/app:page-constructor.App's get-prefix is not setfable anymore.
Slash / is added to the app prefix, this might break if you use apps with prefix like /foo, because now it will become /foo/. This change is required because.
Handle-request generic-function was removed from reblocks/request-handler package.
Timing reporting was removed from request handling code.
Timeout handling was removed from request handling code for a while. Previously there was 180s timeout. It only worked for
SBCLand used unsafe with-timeout function. We need to support deadline propagation instead.A macro reblocks/routes:page was added. It can be used to define a route returning a page's root widget.
Among other app routes you can define a non page routes such as routes for serving static files.
Examples of routes for serving favicon and robots.txt:
#+begin_src lisp ;; static (get ("/favicon.ico") (list 200 (list :content-type "image/x-icon") (asdf:system-relative-pathname :reblocks-ui2-demo "demo/favicons/favicon.ico"))) (get ("/robots.txt") "User-agent: *") #+end_src
Generic function reblocks/server:serve-static-file was removed
App can't be bound to the particular hostname anymore. Just start a different servers on a few ports and route traffic using some kind of reverse proxy.
Lambda list of these macros was changed to accept arguments beside a
BODYargument: with-html, with-html-string, with-app, with-collected-dependencies, with-page-defaultsreblocks/app:page-constructorslot was added toreblocks/app:appclass. This way such common elements as header and footer can be added to all application's pages including error pages.Previously Reblocks server catched only
ERRORconditions, now it will do this for anySERIOUS-CONDITION, becauseSBCL's timeouts are inherited from theSERIOUS-CONDITION.Variable
reblocks/request-handler:*request-timeout*was removed. Now request-timeout can be specified as an argument toreblocks/server:startfunction and it's default value is available asreblocks/variables:*default-request-timeout*.Slot
propagate-dirtywas removed fromreblocks/widget:widgetclass.Slot
continuationwas moved fromreblocks/widget:widgetclass toreblocks/widgets/funcall-widget:funcall-widgetclass.
0.61.1 (2024-09-14)
Fixes
Now local dependencies also could be created with
:DEFERargument. (Thanks for thePRto Breinstew@github)
0.61.0 (2024-09-14)
Fixes
Fixed an error inside
reblocks/actions:make-js-actionfunction when called without:ARGS. (Thanks to olivercsr@github for thePR)
0.60.0 (2024-07-28)
Incompatible Changed
JSfunction initiateFormAction now accepts four arguments instead of three. Second argument should be an event, third - the form object and fourth an options object.
This change allows to submit form using different buttons having their values passed to a lisp callback.
An examples/simple-form.lisp file was added to demonstrate how this feature works when
form has Submit and Cancel buttons.
Note: if you've used Reblocks-UI system, then you'll need to update it to the newest version.
0.59.0 (2024-01-26)
Changed
Generic-function
reblocks/widget:get-html-tagnow can return a list like(list :input :onchange \"somevalue\")to change not onlyHTMLtag of the widget node, but also to add some arguments to it.
0.58.0 (2024-01-13)
Added
A new function reblocks/response:status-code was added as a replacement to reblocks/response:get-code.
The new function is setfable. Now you can change HTTP status code of the currently rendered page.
This is especially helpful when rendering \"Not found\" or error pages.
0.57.0 (2024-01-08)
Added
Error about missing action now is continuable. In case if \"continue\" restart was selected, page is refreshed to update actions in the session.
Now it is possible to use symbol as an action and it will be funcalled to handle an action.
0.56.0 (2024-01-01)
Added
Generic-function
reblocks/page:body-classeswas added and can be used to specify classes forHTMLbody. This can be helpful when making a site using frameworks likeTailwindCSS.
0.55.0 (2023-12-05)
Added
Optional argument :defer was added to javascript dependencies.
Argument
BASE-URIwas added toreblocks/response:make-urifunction.Now Reblocks responds with Server-Timing and this performance information can be viewed in the browser. Read more about this header at Mozilla's docs.
Generic-function
reblocks/widget:updatenow has an optional argumentREMOVED. You can set it to T to remove widget from theDOMtree.
0.54.0 (2023-10-22)
Added
Function reblocks/request:get-remote-ip was added.
Fixed
Now function reblocks/actions:make-action-url removed old action argument if it is present in the
current URL. This fixes the case when you want to make an action url from the callback processing
another action.
JavaScript function initiateFormAction now does not overwrites whole options.args object,
but only replaces the keys corresponding to a form data fields.
0.53.0 (2023-06-20)
Changed
Now all commands added using reblocks/response:send-script or reblocks/commands:add-command
during the call to reblocks/widget:update generic-function, are added after the command
for updating DOM node on the frontend. This fixes a problem happened when you attach
some JS handlers to the DOM node, but after the update these handlers are deleted.
0.52.0 (2023-06-08)
Added
Documentation on
reblocks/widgets/string-widget:string-widgetclass and it's methods.q
0.51.0 (2023-05-27)
Changed
Function
reblocks/actions:make-js-actionnow acceptsARGSargument. If given, it will be serialized as a dictionary and embedded into the action calling code. This way you can pass the arguments back into your lisp callback.
Added
Added
includeCSSandincludeJScommand handlers. This makes it possible to send such kind of commands via a websocket.Now all widgets rendered on a page are collected into a hash table and you can find them by dom-id using
reblocks/page:find-widget-by-idfunction.
0.50.0 (2022-12-03)
Fixed
Fixed a bug when session lock was written into the session itself instead of into the inner hash table.
Fixed error handling when debug-mode is off. Previously, the debugger was invoked before showing 500 error page to the user.
Now every response has \"Cache-Control: no-cache, no-store, must-revalidate\" header to prevent caching of dynamic content in the browser. This fixes the issue when you did some changes using actions then went to another page and returned using \"Back\" button in the browser. Previously browser was able to show you an old content of the page.
Added
Current page abstraction
Added a notion of the current page. Now all actions are bound to some page and pages can expire, clearing actions from the memory. This should prevent memory leak leading to posible DoS attack. Page expiration is controlled by two values:
A number of seconds while page should be considered alive. This prevents evil person from filling memory by creation of many separate sessions.
A maximum number of pages per session. This may be needed to protect from opening too many pages within one session.
Also, you can use reblocks/page:extend-expiration-time function to extend current page's
expiration time.
When all pages in the session are expired, session is removed from the memory too.
Generic-function reblocks/page:on-page-refresh was added.
Cached widget dependencies
Another interesting feature is mixin class reblocks/cached-dependencies-mixin:cached-dependencies-mixin.
Changed
These functions were moved to separate package REBLOCKS/PAGE-DEPENDENCIES:
with-collected-dependencies
get-collected-dependencies
push-dependencies
already-loaded-p
page-dependencies
New generic-function reblocks/session:init-session was introduced. Define a method if you
need to add something into the user's session when it is initialized. This function will
be called once per user.
Generic function REBLOCKS/SESSION:INIT was replaced with reblocks/page:init-page and it will
be called each time a user opens site in a new browser window or tab. When user refreshes
the page it will not be called.
Function reblocks/debug:reset-latest-session now provides a convenient restart to enable debug mode.
Deleted
Function reblocks/widgets/root:get was deleted. Use (page-root-widget (current-page)) instead.
Also root-widget-key and corresponding package reblocks/widgets/root were removed.
0.49.0 (2022-11-26)
New functional was added which allows to control how does HTTP middlewares list is generated for the server.
You might define your own reblocks/server:server class and a method for reblocks/server:make-middlewares generic-function.
Inside this method, you might inject additional middlewares using reblocks/server:insert-middleware function.
Also, a variable reblocks/server:*default-samesite-policy* was introdiced, to control default value of the SameSite HTTP header.
As a bonus, loading of reblocks-docs system was fixed.
0.48.0 (2022-11-07)
Fixed
Now Reblocks remembers which dependencies are already loaded into the page and
will not fetch them again. This fixes issue when it fetched jQuery and broke
it's extensions making further action calls made via GET instead of Ajax.
0.47.0 (2022-11-04)
Added
Added ability to set cookie in response handler. You can do it in any render method.
Here is an example how to expire a cookie right now:
(reblocks/response:set-cookie
(list :name "auth_token"
:value ""
:path "/"
:expires (get-universal-time)
:secure t
:samesite :lax))0.46.1 (2022-09-16)
Fixed
Error page rendering was fixed. Now such variables as page description, tags and title are bound to their defaults while calling
reblocks/error-handler:on-errorgeneric-function.
0.46.0 (2022-07-03)
Changed
Generic-function
reblocks/error-handler:on-errornow acceptsBACKTRACEargument which may contain a string with a backtrace. Previously, default method of this generic-function has rendered wrong backtrace when you aborted request in debugger.Also, a function
log4cl-extras/error:print-backtraceis used now to format a backtrace for error page and now it looks the same as backtrace in logs.Plus, a backtrace now logged only once when unhandled error happens.
Removed
Macro
WITH-HANDLED-ERRORSis not exported fromREBLOCKS/ERROR-HANDLERpackage anymore.
0.45.3 (2022-06-25)
Fixed
Fixed how
reblocks/page:get-titleand other similar functions change the state. Previously there was a bug and these functions have changed a global variables.
0.45.2 (2022-06-06)
Fixed
Fixed loading of
CSSstyles for new widgets appearing on a page.Fixed starting server in debug mode.
0.45.1 (2022-06-02)
Added
Added function
reblocks/preview:stopto stop an app for previewing widgets during development.
Fixed
Fixed the way how dependencies are rendered in
AJAXaction response. Previously, when many widgets of the same class were updated on one user action Reblocks sent a duplicate css/js dependencies.Function
reblocks/request:refresh-request-pwas fixed and now works as expected.
0.45.0 (2022-02-14)
Changed
Interactive demos now are rendered just as code block into markdown documents. Such code block is followed by a link to
HTMLdocumentation ifASDFsystem defines ahomepage.
0.44.0 (2022-02-09)
Fixed
Fixed the way how welcome page app is started. Now it always started unless some other application does not use "/" prefix.
Also, fixed the way how application is choosen depending on request url path.
Function
reblocks/server:stopnow removes all application and routes from the server instance. This way when you'll start it again, server might serve another set of the applications.Now if you redefine your app using
reblocks/app:defappmacro and changeAUTOSTARTargument fromTtoNIL, this app will be removed from the list of applications to autostart.
Added
Now macro
reblocks/app:defappsupportsDOCUMENTATIONargument. Use it to add documentation to application's class.
0.43.0 (2022-02-07)
Changed
Argument
CACHE-IN-MEMORYwas added toreblocks/dependencies:make-dependencyfunction. It allows to compile local dependency into the memory. This way you can build a standalone executable webserver withoutJSandCSSdependencies!jQuery and some other dependencies now are cached in memory at compilation time.
0.42.0 (2022-02-06)
Fixed
Now each app set's its own root widget. Root widgets is choosen depending on current application. and current application depends on the url path prefix. Previously site with multiple apps always shown the same root widget.
Fixed the error occured after you stopped the webserver and started it again using the same port. Previously Reblocks complained that the server is already running on this port.
Fixed the way how Reblocks signal an error on missing action. Now it does this by default from the default implementation of the
reblocks/actions:on-missing-actiongeneric-function. But if variablereblocks/variables:*ignore-missing-actions*ist, then error will not be signaled and user will be redirected to the application's previx path.
Changed
Documentation examples server was changed to render a list of
ASDFsystems for which documentation was built.reblocks/preview:preview(12) is able to accept a widget's class as a symbol.
0.41.0 (2022-01-05)
Removed
Function
reblocks/utils/misc:asdf-system-directory. Useasdf:system-source-directoryinstead.
0.40.0 (2022-01-03)
Added
Added a welcome screen app on "/" that lists the active apps.
Generic-function
reblocks/widget:create-widget-fromnow returns a more user-friendly error message, explaining that the widget is not of a good type, instead of "no applicable generic method".A new function
reblocks/preview:previewwas added. Give it a widget and it will setup a server on a random port and show the widget in a browser!Ability to run many web servers each on it's own
HTTPport. Each server can have it's own set of applications.Added a log in
weblocks/app:startto show the prefix of the app that is started.Changed
(weblocks/debug:on)andoffso they set the log level todebugandwarn, respectively.Changed a library used to log unhandled errors. Now log4cl-extras is used, because it is a successor of log4cl-json.
Function
reblocks/server:stopnow accepts optionalinterfaceandportarguments.Function
reblocks/action::function-or-action->actionwas renamed toreblocks/actions:make-actionand made public. Oldreblocks/action:make-actionwas renamed toreblocks/action::internal-make-action.JSfunction initiateActionWithArgs now usesPOSTmethod by default.Function
reblocks/actions:make-action-urlis exported now and it keeps query params by default.
New Functions
Removals
Package
reblocks/widgets/basewas removed. All code now is in thereblocks/widgetpackage, which was a nickname previously.reblocks/app:get-active-appsreblocks/app:finalize-webappreblocks/app:app-active-preblocks/app:startreblocks/app:stopreblocks/app:restartJSfunctioninitiateActionWithArgsAndDeferredCallbackwas removed because of leaky abstraction of a single deferred object per page.JSfunctionsinitiateActionWithArgsandinitiateActionWithArgsAndCallbackwere combined into a singleinitiateActionfunction.JSfunctionsinitiateFormActionandinitiateFormActionWithCallbackwere combined into ainitiateFormActionfunction.
Also removed:
A variable
*current-page-headers*, define an:AFTERmethod forreblocks/page:render-headersinstead.*approved-return-codes**current-page-keywords**current-page-title**style-warn-on-circular-dirtying**style-warn-on-late-propagation**rewrite-for-session-urls*Functions
reblocks/routes:add-routeandreblocks/routes:add-routeswere made internal.
Other changes
If local dependency can't be found relative to the given ASDF system, we try to search
the same path relative to the current directory and throw error if file can't be found.
This could happen if you've compiled the webserver into a binary and moved it to another
container or machine.
reblocks/server:start function now accepts SAMESITE-POLICY argument which should be one of
keywords: :LAX, :STRICT or :NONE. This parameter modifies SameSite part of the cookies
sent to the client.
Hooks API was refactored in a backward incompatible manner. reblocks/hooks:defhook macro now requires
to specify hook's arguments and all macros generated by the reblocks/hooks:defhook also require arguments
specification.
jQuery was upgraded from 1.8.2 to 3.6.0. It's plugins jquery.ba-bbq.js and jquery-seq.js were turned off.
0.39.1 (2020-01-20)
Fixed
Fixed processing of the value
x-forwarded-port. Previously, when Weblocks was used along with lastest (after the 2019-09-07)Wooserver, this header lead to the 500 error. Because behavior of theWoowas changed:
https://github.com/fukamachi/woo/issues/84
Now Woo does not parses numeric headers and Weblocks has to do it itself.
0.39.0 (2019-09-16)
Changes
A new macro
reblocks/routes:defroutewas added.
It defines a handler for a given route. By default route should return
a serialized JSON:
(defroute (app /api/data)
"{\"my-data\": [1, 2, 3]}")but you can redefine the content type:
(defroute (app /api/data :content-type "application/xml")
"<my-data><item>1</item><item>2</item></my-data>")each route is associate with application class and these routes
are added to the mapper when you call a start method.
0.38.1 (2019-08-02)
A small fix to make it work with
weblocks-websocket.
0.38.0 (2019-07-07)
Unhandled error processing was fixed. There were numerous problems with error processing:
Previosly server stopped to work because clack tried to write into a closed stream.
Also, before this fix, error page didn't showed propertly.
Any error in the route lead to a server stop because there wasn't any handler at all. Now they are handled with
on-errormethod as errors in block/page rendering.
All of them are fixed now.
0.37.0 (2019-06-01)
Removed check if
:bordeaux-threadsis in the*features*, because this does not work in runtime in precompiled binary.
0.36.0 (2019-05-03)
Added function
weblocks/session:expire, which can be used to tell Weblocks to delete current session after request processing.Also, now session middleware is created explicitly along with memory store. This made possible to add another two functions to gather some statistics about number of sessions:
weblocks/session:get-number-of-sessions;weblocks/session:get-number-of-anonymous-sessions;The function
weblocks/widgets/base:get-html-tagwas fixed to render tables correctly. If the widget's parent is a:tableelement, then this function returns:tr(instead of a:div). If it is:tr, it returns:td, and:divotherwise.A new setting
weblocks/html:*pretty-html*was created, to further control pretty printing of html both in code and in tests.
0.35.3 (2019-03-31)
Added a
weblocks/response:add-retpath-tofunction, useful to add aretpathGETparameter to theURL.
For example, calling:
(add-retpath-to "/login" :retpath
"http://example.com:10050/foo/bar")
Will return:
```lisp
"/login?retpath=http%3A%2F%2Fexample.com%3A10050%2Ffoo%2Fbar"Argument :retpath is optional. By default, function
will take an URL of the current web page.
0.35.2 (2019-03-21)
Subsystem
weblocks/utils/i18nwas added to asd file, because otherwise systemweblocks-uican't be installed from the Ultralisp.
0.35.1 (2019-02-02)
Previosly, when you called
(weblocks/debug:off), subsequent call to(weblocks/debug:status)returnedT, but should returnNIL.
This was fixed now.
0.35.0 (2019-01-22)
Request handling pipeline was refactored.
The idea of this refactoring, is to separate roles of the functions
which process requests. Now weblocks/server:handle-http-request
prepares data received from the Clack and calls
weblocks/request-handler:handle-request to do the real job.
In it's turn, weblocks/request-handler:handle-request should return
an object of type weblocks/response:response containing a content,
HTTP status code and headers of the response. Any error signal, thrown
from the handle-request is considered by handle-http-request as
an "unhandled error" and returned with 500 HTTP status code.
Here is a list of changes:
Macro
weblocks/hooks:on-application-hook-handle-requestwas renamed toweblocks/hooks:on-application-hook-handle-http-request.Generic-function
weblocks/request-handler:handle-client-requestwas renamed toweblocks/request-handler:handle-requestand now this function should return eitherstringor an object of typeresponse. Previously, it also made a non-local exit by throwing a tag, if request was aborted (for example to return a redirect response). But now it should only unwind a stack in case if some unhandled errow was thrown. Any condition of typeweblocks/response:immediate-responsewill be catched inside a:around weblocks/request-handler:handle-requestmethod and returned as usualresponseobject.Function
weblocks/response:abort-processingwas renamed toweblocks/response:immediate-return, symbols*code*,*headers*and*content-typeare not exported anymore. Instead of these global variables, use newly exported functionsget-content,get-code,get-headers,get-custom-headersandget-content-typeto extract information from theresponseobject.Package
weblocks/responsedoes not export symbols*code*and*content-type*anymore, but exports a functionmake-responsewhich can be used by aweblocks/request-handler:handle-reqiestto return response.
0.34.0 (2019-01-19)
New
Function
weblocks/request:get-schemewas added and it is usesX-Forwarded-Protoheader, if it is available.
Changes
Function
weblocks/request:get-portnow will useX-Forwarded-Portheader if it is available.Function
weblocks/request:get-hostnow will useX-Forwarded-Hostheader if it is available.
Fixes
Fixed issue introduced in
0.33.2release - systemlack-middleware-sessionwas loaded successfully, butSBCLwas unable to findlack-middleware-sessionpackage.Now
HTMLis pretty-printed by default on all implementations.Function
weblocks/request:get-uriwas fixed to work correctly when server is behind a reverse proxy which providesX-Forwarded-*headers.
0.33.2 (2018-12-06)
Fixes
Added dependency on
lack-middleware-sessionsystem because wee use it to store sessions.
0.33.1 (2018-11-24)
Improvements
Now unhandled exceptions are logged with tracebacks if you are using
log4cl-jsonlibrary. To turn it on, just do:
(log4cl-json:setup)Fixes
Function
response:redirectand it'sJScounterpart was fixed and now work as expected.Request processing was streamlined and now
weblocks/server:handle-requestdoes not contain non-local exits. This fixes usage of thehandle-requesthook, because previously, if you wrap some code around(call-next-hook), then part followingcall-next-hookwas ignored.
For example:
(weblocks/hooks:on-application-hook-handle-request
connect-to-database ()
(let ((success nil))
(unwind-protect (progn (setup-transaction)
(weblocks/hooks:call-next-hook)
(setf success t))
(if success
(commit)
(rollback)))))Before this fix, rollback always called, because execution never
hitted (setf success t). Now this is fixed.
0.33.0 (2018-11-22)
Changes
Removed external symbol
weblocks/app:make-uribecause it wasn't fbound to any function after some refactoring.
Use weblocks/response:make-uri instead.
Fixes
A separate file
widget.lispwas added to define aweblocks/widgetpackage. This solves issues whenASDFpackage inferred loading is unable to findweblocks/widgetsystem. Seems it plays badly whenweblocks/widgetis nickname forweblocks/widgets/base.
0.32.1 (2018-08-13)
Changes
A new hook was added -
start-weblocks. It is called around the code in(weblocks/server:start)and can be used to setup some additional routes, for example.
Fixes
Previosly, there was an error if you are using
ASDF's package inferred system class and don't have explicit dependency on theweblockspage.
The error was raised during code loading:
;;; > Error: There is no applicable method for the generic function:
> #<STANDARD-GENERIC-FUNCTION WEBLOCKS/JS/BASE:MAKE-JS-BACKEND #x3020027E292F>
> when called with arguments:
> (:JQUERY)
Now it is fixed and package weblocks/js/jquery is a dependency of
weblocks/server and always loads.
0.32.0 (2018-06-26)
Now weblocks system explicitly requires
ASDF>= 3.1, because it usespackage-inferred-systemclass.
0.31.1 (2018-06-16)
Fixed error about missing 'bool type under
SBCL.
0.31.0 (2018-05-29)
We don't enforce
*print-pretty*inside ofweblocks/html:with-htmlmacro. This hack was required because the bug in the spinneret, which was fixed at 2018-01-04:
https://github.com/ruricolist/spinneret/commit/06b280612aff07cf376f593746d080230f2c7462
0.30.1 (2018-05-20)
Error was fixed when you are trying to start a server which is already running. Now you have a "restart" to stop the old version of the server before starting the new one.
However, it does not work with Woo server, because C library libev
crashes with error:
Assertion failed: (("libev: a signal must not be attached to two different loops", !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop)), function ev_signal_start, file ev.c, line 40820.30.0 (2018-05-19)
Fixed the order of commands for frontend. Now they are returned in the chronological order.
0.29.0 (2018-05-05)
Backward incompatibilities
Class weblocks/dependencies:dependency now requires that type
attribute shoulde be of type (member :css :js :png :jpg :gif)
Also, functions make-local-js-dependency,
make-local-css-dependency, make-local-image-dependency,
make-remote-js-dependency and make-remote-css-dependency were
removed from package weblocks/dependencies. Use make-dependency
function, it will figure out which dependency type to create itself.
Improvements
A new function weblocks/debug:get-session-value was added. It can be
used to get values from the last session seen by weblocks.
0.28.0 (2018-04-23)
Error handling was fixed. Previously it aborted Woo's worker thread and break the server.
Variable weblocks/variables::*catch-errors-p* was renamed to
weblocks/variables::*invoke-debugger-on-error* and it's value was
inverted. If this variable is True, then debugger will be
invoked. Otherwise - Weblocks will return 500 error page.
Argument :invoke-debugger-on-errors of weblocks/debug:on
function was renamed to :invoke-debugger-on-error.
Method weblocks/error-handler:on-error now is called when you abort
request processing from the debugger. It is called with current app as
the first argument and the nil instead of condition.
0.27.2 (2018-04-09)
Fixed a typo in string-widget and funcall-widget package definitions.
0.27.1 (2018-04-09)
Now string-widget and funcall-widget depends on
weblocks/widgets/base instead of weblocks/widget.
0.27.0 (2018-03-11)
Reloading of the defapp definition now does not tries to restart an application. Previously, restart caused the problem – when there is only one application, whole Weblocks server was shut down. So, I've removed this implicit action.
Code which logs action result on the client-side was improved.
0.26.0 (2018-02-20)
Symbols add-application-hook, add-request-hook,
add-session-hook, prepare-hooks and call-hook
aren't exported from weblocks/hooks anymore. Use new macro
defhook instead.
Here is how it works:
You use defhook as the toplevel form of your file if you want to define
a new hook. This macro will create few other macroses in
weblocks/hooks package and will export them. For example:
(defhook database-opened
"This hook is called when your application opens a database.")This code will add these macroses into the weblocks/hooks package:
on-session-hook-database-opened,
on-request-hook-database-opened,
on-application-hook-database-opened,
with-database-opened-hook and
call-database-opened-hook.
You need to wrap code, which opens a database, with
with-database-opened-hook:
(weblocks/hooks:with-database-opened-hook ()
(do-some-staff-to-open-database))And in any other piece of code, you can define callbacks, using one of other three macroses:
(weblocks/hooks:on-session-hook-database-opened
log-database-opening ()
(weblocks/hooks:call-next-hook)
(log:info "Database was opened"))Usage of defhook macro gives more transparency to all defined hooks,
because all of them now visible as external symbols in
weblocks/hooks package.
0.25.2 (2018-02-04)
System weblocks/hooks now depends on log4cl and
metatilities, because previously sometimes it was impossible to load weblocks.
0.25.1 (2018-02-04)
Old tests for widgets, removed from core framework were removed.
Tests for widget's MOP methods were ported to Rove.
Package weblocks/utils/close now loaded with main :weblocks
system.
Few old widget tests were removed.
Added function weblocks/session:reset which resets current session.
0.25.0 (2018-01-31)
Good news, everyone!
Quickstart tutorial was fixed!
Widget related changes
Function render-widget was replaced with weblocks/widget:render
:around method. Method implementation were moved to
weblocks/widgets/render-methods.
Funcall-widget's package was refactored to conform package inferred requirements.
Actions processing
Function make-js-action was moved to weblocks/actions package.
Application and server restarting
Package weblocks/app now exports functions stop and restart.
Previously they were internal and were called like stop-webapp and
restart-webapp.
Package weblocks/server does not export start-weblocks and
stop-weblocks functions. They were replaced with just start and
stop. Also, it's internal generics start and stop were
renamed and transformed to start-server and stop-server
functions.
Session initialization changes
File default-application.lisp was removed, because now every
application has default session initialization method.
File default-init.lisp was refactored. Now it provides default
method for weblocks/session:init generic and :around method for
same generic, which allows end user just to return a string or a
function from his init method.
Now user can return any string or function from his method
weblocks/session:init and it will be passed to a new generic
weblocks/widget:create-widget-from to create a root widget. You can
also define create-widget-from for you custom types.
Debug
Function weblocks/debug:on now turns on mode when Weblocks does not
intercept unhandled conditions, but calls an interactive debugger.
Removals
session-name-string-pairthis function was removed in previous releases, but didn't find it's way to the changelog, still used in some older tests not ported to the Rove.Macro
defrenderwas removed.
0.24.0 (2018-01-29)
All rendering code was refactored.
Macroses with-html and with-html-to-string replaced
with weblocks.html:with-html and weblocks.html:with-html-string.
Stream *weblocks-output-stream* was moved to
weblocks.html::*stream* and is not external anymore. Please, don't
use it directly.
Widget refactorings
Procedure update-widget-tree was removed and not widgets can't
change html header's tags, description, title, etc. If you need this,
change them in the render method.
Macro root-widget was removed and replaced with function
weblocks.widgets.root:get.
Request level
Functions post-action-redirect, post-render-redirect and
initial-request-p were removed from weblocks package.
Function pure-request-p was moved to weblocks.request package.
Variable *json-content-type* was removed.
Variable *latest-request* was moved to
weblocks.debug:*latest-request*.
Functions parse-location-hash, ajax-request-p were moved to
weblocks.request package.
Function redirect was moved to weblocks.response:redirect.
Functionality, related to opening another window instead of redirection
or deferring redirection until the end of action or rendering was
removed.
Request handler
Functions remove-duplicate-dirty-widgets,
update-location-hash-dependents and update-widget-tree were
removed.
Call to weblocks::update-dialog-on-request from
handle-client-request was commented.
Error handler
Generic method weblocks/error-handler:on-error now accepts two
arguments - application object and condition.
Application level
All code from uri-parameters-slotmap.lisp was removed.
All code, related to application class, was moved to the package
weblocks.app. Base aplication class was renamed to
weblocks.app:app, and macro for definition of the new
application was renamed to weblocks.app:defapp.
All code related to application's metaclass, was moved to
the package weblocks.app-mop. Metaclass was renamed to
weblocks.app-mop:app-class.
Application's slot html-indent-p and corresponding accessor
weblocks-webapp-html-indent-p were removed because now spinneret
generates non indented code.
Slot init-user-session was completely removed and replace with a generic
weblocks.session:init.
These dependency related slots and accessors were removed:
application-dependenciesweblocks-webapp-application-dependenciesbundle-dependency-typesversion-dependency-typesgzip-dependency-types
And macro for defining a special readers for them was removed as well:
def-debug-p-slot-readers.
Also, these arguments to defapp was removed:
:ignore-default-dependencies, :dependencies
Function update-thread-status and method webapp-update-thread-status
were removed.
Function get-webapps-for-class was renamed to app-active-p and
now returns t if application of given class is already active.
Function start-webapp was renamed to weblocks.app:start.
Function get-webapp was renamed to get-active-app and optional
argument error-p was renamed to keyword argument signal-error.
Function find-app was removed.
Function in-webapp was moved to weblocks.debug:in-app.
Variable *default-webapp* was removed.
Variable *active-webapps* was renamed to
weblocks.app::*active-apps* and made internal. Use
weblocks.app:get-active-apps function.
Reader weblocks-webapp-prefix was renamed to
weblocks.app:get-prefix.
Slot default-store-name and its accessor
webapp-default-store-name were removed.
Variable *current-webapp* was moved to
weblocks.variables::*current-app*.
Functions compute-webapp-public-files-uri-prefix,
compute-webapp-public-files-uri-prefix,
compute-webapp-public-files-path,
make-webapp-public-file-uri,
weblocks-webapp-public-files-cache-time and variable
*default-public-files-path* were removed because
now there is another way to serve static.
Function webapp-serves-hostname was renamed to
weblocks.app:app-serves-hostname-p and now accepts app as the first
argument and hostname as the second.
Variable *uri-tokens* was removed and weblocks does not set
'last-request-uri session value to all uri tokens anymore.
Macro with-webapp was moved to weblocks.app:with-app.
Function webapp-permanent-action was moved to
weblocks.app-actions:get-action.
Function add-webapp-permanent-action was moved to
weblocks.app-actions:add-action and remove-webapp-permanent-action to
weblocks.app-actions:remove-action.
Macroses define-permanent-action and define-permanent-action/cc
were moved to weblocks.app-actions:define-action and
weblocks.app-actions:define-action/cc.
Function make-webapp-uri was removed, use
weblocks/response:make-uri instedad.
Accessor webapp-js-backend was renamed to get-js-backend
These functions were moved into the separate package
weblocks.current-app and renamed:
webapp-prefix->get-prefix;
Actions and commands
Function weblocks.actions:add-command was moved to
weblocks.commands.
Function weblocks:get-request-action was moved to
weblocks/actions:get-request-action
Keyword argment :action was removed from action calls.
Javascript
Package weblocks.js was renamed to weblocks/js/base.
Functions escape-script-tags, %js and macroses
with-javascript, with-javascript-to-string were moved to the
package weblocks/js/base.
Variables
These variables were moved from weblocks package to
weblocks/variables:
*current-page-title**current-page-keywords**current-page-headers**rewrite-for-session-urls**default-content-type**ignore-missing-actions*
Symbols moved from :weblocks to other packages
To :weblocks/widgets/dom
dom-object-mixindom-id
To :weblocks/utils/uri
request-uri-pathadd-get-param-to-urlremove-parameter-from-uri
To :weblocks/linguistic/grammar
pluralizesingularizeproper-number-formvowelpconsonantpproper-indefinite-articlearticlize*current-locale*current-localerussian-proper-number-formnoun-vocative-to-genitive*debug-words-forms**debug-words-genders*determine-gender
To weblocks/utils/warn
style-warnwebapp-style-warningrenamed tostyle-warning.non-idempotent-renderingmisunderstood-action
To weblocks/actions
function-or-action->actionmake-actiongenerate-action-code
Removals
To make Weblocks core smaller, many files were removed: views, widgets,
html-parts, utilities.
Systems weblocks-util, weblocks-testutils were removed.
Accessor dom-class and generic function dom-classes were removed
and replaced with generic function weblocks/widget:get-css-classes.
Generic function weblocks:handle-error-condition was removed.
Variable *dirty-widgets* was removed along with
render-dirty-widgets function.
Dependencies
Rendering of remote (non cached) dependencies was fixed.
0.23.0 (2018-01-11)
Symbol
weblocks.routes:*routes*is not external anymore. Useweblocks.routes:add-routeandweblocks.routes:get-routeto add new routes and to search a route matched on a path.Fixed getting the rendered widgets in
weblocks.widget:updatemethod when making:update-widgetor:insert-widget (before)commands.Temporary added method
weblocks::child-of-pfor new type of widget. This should fix some issues, with widgets updating.
0.22.2 (2018-01-07)
Class
weblocks.widget:widgetwas exported, to make possible to define widgets based on it and some mixins.
0.22.1 (2018-01-07)
Code broken in previos release was fixed.
0.22.0 (2018-01-06)
Most functions from weblocks.request were refactored and renamed:
request-parameters->get-parameters;request-parameter->get-parameter;request-header->get-header;remove-request-header->remove-header;request-server-name->get-host;request-server-port->get-port;request-uri->get-uri(and now it returns fullURIwith scheme, host and port;request-path-info->get-path(and now it has keyword argumentwith-paramsto copy behaviour of oldrequest-uriand return strings like/some/path?with=parameters;request-method->get-method.
All these function now accept keyword argument :request. Previously
it was &optional.
Another change is a new function weblocks.response:make-uri. It can
be used to build new uri, based on the uri of the current request. This
can be useful when embedding links into emails, for example.
Warning! These changes require a newer version of Lack.
I've made a pull request https://github.com/fukamachi/lack/pull/31 it is not merged yet, so, alternative version of Lack can be used, by installing it using Qlot, from here:
https://github.com/40ants/lack
0.21.0 (2018-01-01)
Macro
weblocks.session:get-valuewas replaced with a regular function.Function
weblocks.session:set-valuewas removed and replaced with a setter(setf get-value).
0.20.1 (2017-12-20)
Removed debug these debug messages from client-side
JS:LOADED;Starting
AJAX;Stopping
AJAXprogress;Some
AJAXerror;Action success.
0.20.0 (2017-12-15)
Package
weblocks.debugnow does not export*onvariable, but provides three functionson,offandstatus.New method
weblocks.server:serve-static-filewas introduced. It can be used to create static routes which will respond with file's content. For example, you could add this to your app'sinitialize-instancemethod:
(weblocks.server:serve-static-file
"/favicon.png"
(asdf:system-relative-pathname :app "favicon.png"))0.19.2 (2017-11-29)
Now weblocks rebinds
*random-state*to itself for each request to allow it to usesetfand change*random-state*until the end of request processing.
0.19.1 (2017-11-23)
Dirty widgets rendering was fixed.
0.19.0 (2017-11-13)
Variable
*expired-action-handler*, methodexpired-action-handlerand functiondefault-expired-action-handlerwere replaced with methodweblocks.actions:on-missing-action.Now we are trying to call action only if action's name was given.
Old method
weblocks:handle-client-request ((app weblocks-webapp))was removed. Look at it's newer version inweblocks.request-handler.
0.18.0 (2017-11-12)
Commented out call to
update-widget-treeinside of(setf widget-children), because it breaks on(get-widgets-by-type 'selector :root obj)sometimes. Seems this is because I've removed selector's code previously.
Warning! Probably parent/children handling code will be removed soon.
Backtrace printing code was replaced with direct usage of
trivial-backtrace:print-backtrace.Call to
prepare-hookswas moved fromweblocks.request-handler:handle-client-requestto the the weblocks.server:handler-request, to fix session hooks processing when:process-requesthook is called.
0.17.2 (2017-11-11)
Error handling code was fixed. It was broken in 0.17.1 and prevented system loading.
0.17.1 (2017-11-11)
Fixed error handling when debug mode is "off". Now weblocks returns result of
(weblocks.error-handler:on-error app)call.
0.17.0 (2017-11-11)
Added a
weblocks.actionspackage.Also, a
commandswere introduced. Commands describe remote calls which have to be applied on a client as a result of action's execution. Previously, weblocks used similar technic to replace dirty widgets and to execute some javascript code before or after replacement. The new mechanism of "commands" is more generic and uses theJSON-RPCto pass function name and parameters from backend to client-side.Added
weblocks.session:in-session-pfunction which returnstif session data can be retrived or stored without error.Now function
initiateActionWithArgsAndCallbacksend arguments asJSONpayload. This allows to send any datastructures as action's params.Function
weblocks.response:send-scriptwas changed to use new mechanizm with commands. When you send script from the action, it will add a command:execute-codeto the stack. All commands are executed in same order as they were added. If you want some code to be executed before widget update, just executesend-codebeforeweblocks.widget:update.
0.16.0 (2017-11-04)
New package was introduced -
weblocks.widgetit contains a newwidgetclass with simplified rendering based onspinnerettemplating library.Now class
routeis exported fromweblocks.routesand should be used instead ofroutes:route.New package
weblocks.error-handlerwas introduced. It contains aon-errorgeneric method which is called when some unhandled error raise by application.Fixed issue of adding multuple routes mapped to the same path. Now if url mapper already have a route all subsequent attempts to add a route with same path are ignored.
Fixed error:
Undefined function WEBLOCKS:WEBAPP-SESSION-KEY called with arguments
(#<APP::APP #x3020052F01DD>)
Fixed
Content-Typeof the default 500 page. Previously it wasplain/textand browser didn't undestand that and downloaded the file.
Now Content-Type is text/plain.
0.15.0 (2017-11-03)
Now weblocks does not checks if all tokens from
URLwere consumed by app during root widget rendering. Previously it returned 404 if some token weren't consumed. Implement this logic in your app if needed.Macro
assert-hooks-calledwas changed to return hooks in the order they were called. Also, now it waits hooks description as aDSL, like:
lisp
(assert-hooks-called
(:fact-created contact "vasya@pupkin.com")
(:fact-removed contact "vasya@pupkin.com"))
New system
weblocks-testutilswas introduced. It compilesweblocks.t.utilspackage which macroses useful for unittesting.
Also, a new macro catch-hooks was added to check if some
hooks were called during a unittest.
* Now weblocks does not open a new tab or window on 500 error
during an action execution.
0.14.4 (2017-10-07)
No more
declaim optimizein different places. These declarations changed compiler's settings at unexpected moments.Fixed error happened when "File not found", and now
with-hookmacro returns the value of the last form's evaluation.
0.14.3 (2017-09-23)
Default method of
render-pagewas fixed to really wrap page with<html>...block.Fixed a way how weblocks.debug:*latest-session* is processed.
Function
weblocks.request:remove-request-headernow returns a new instance of request object and does not modify the original request. This fixes issue inweblocks-websocket.
0.14.2 (2017-09-22)
Added package
weblocks.debugand keeping latest session was rewritten using:process-requesthook.
0.14.1 (2017-09-22)
Added function
weblocks.request:remove-request-header.Added a hook
(:reset-session session), which is called around a code for clearing given session. Right now it is called only fromweblocks.sessions:reset-latest-session.
0.14.0 (2017-09-20)
html,menu,suggestandreplutilities were excluded.Code which was in
request-handler.lisp, was excluded from build and partly moved torequest-handler2.lisp.Added
:stop-weblockshook.Misc helper for repl were removed:
sessions,in-sessionandpt. May be the will be restored in separate package.Page boilerplate rendering method
render-pagenow does not use complex templating with contextes.Symbols refactoring:
*style-warn-on-circular-dirtying*variable ->weblocks.variables;*style-warn-on-late-propagation*variable ->weblocks.variables;gen-idfunction ->weblocks.session;send-scriptfunction ->weblocks.response;with-html-formmacro ->weblocks-ui;*approved-return-codes*variable ->weblocks.variables;handle-ajax-requestmethod ->weblocks.request-handler;update-location-hash-dependentsfunction ->weblocks.request-handler.render-linkfunction was moved toweblocks-ui.formin separate system.
0.13.11 (2017-09-12)
Added
weblocks.hooks:call-hookhelper.Now
call-next-hookis called automatically if it wasn't called explicitly.
0.13.10 (2017-09-06)
Added
:handle-requestdynamic hook called around request handling code.
Called when weblocks.request:*request* and weblocks.session:*session* are already bound.
0.13.10 (2017-09-06)
Added
:handle-requestdynamic hook called around request handling code.
Called when weblocks.request:*request* and weblocks.session:*session* are already bound.
0.13.9 (2017-09-02)
Added integrity field for remove javascript dependencies. Also,
get-cross-originand:cross-originwere removed toget-crossoriginand:crossorigin, to conform the html attibute's spelling.
0.13.8 (2017-09-02)
Fixed error on
(weblocks:redirect...)call.Fixed dependency handling in ajax requests.
Now if unhandled exception occure, Woo's handler remains working. Previously, handler's thread shut down on any unhandled exception.
Ajax progress now does not inserted into the document, but if element with id
ajax-progressis present, it will be shown and hidden by jQuery's.showand.hidemethods. Also, they take optional speed parameters fromdata-*attributesdata-show-speedanddata-hide-speed.Reformatted documentation. Started to keep a changelog.
0.13.7 (2017-04-15)
Previous history wasn't tracked.