A friend raised a great question after reading the last post:
If I am reading a list of books (List[Book]
) from the database, wouldn’t I lose the type information augmented by phantom type? If so, what good is phantom type if it can be used only for statically initializing (Book) instances.
One of the email providers I highlighted in the Degoogling post was Skiff, whihc is no longer alive. It was abruptly shut down in a day without notice, even to the patrons of their Discord community, in which I was a member. Skiff was acquired by Notion.
Making illegal states irrepresentable is a powerful technique in (functional) programming. The technique constrains certain operations to specific states, preventing your code from compiling if you attempt an invalid operation. The other less-than-ideal alternative is to check for valid states for operations at runtime.
SBT does not allow re-publishing artifacts with the same version unless it is a snapshot version. A snapshot version ends with the -SNAPSHOT
suffix, such as 0.1.0-SNAPSHOT
. Re-publishing, which involves running the sbt publish
or sbt publishLocal
command for the second time or more, is standard, especially for snapshot versions. If you attempt to re-publish a non-snapshot version, SBT will warn you with the following message and not publish the artifact.
More ...
Who can tell me what is the result of this expression?
"ะ" == "B"
You can use a repl of your choice, say Scala or Python, to evaluate the expression. Be prepared with an explanation for the result you see ๐
This post is the final part of the series on SBT. I hope I covered everything needed to break the ice and change the perspective on SBT. I have touched on most ingredients you need to write a decent fully-functional build definition. But there is a lot more to SBT.
In this post, I will discuss some things, nifty and a la carte, on SBT.
More ...I had planned to finish the series with this post. But Plugin s wouldn’t let me. I am going to show you how to write/publish a SBT project that is a Plugin, and I will show a nifty trick. It is not a trick, it is what SBT can do like a piece of pie. More ...
So far, we have everything we need to write the build definition for a single project. Today, we’ll see another powerful feature of SBT: Multi-module builds. More ...
Recently, I had a lunch meeting with an acquaintance who shared their interview experience, particularly behavioral questions. One of the questions asked was, “Works and on time or Perfect and late?” This question sparked a debate, as the interviewer was firmly in the former camp.
Previously, we discussed Plugin s. Today, let us see how to better organize build code.
build.sbt
Build code involves everything SBT will consume for the build
More ...